Posts

Showing posts from January, 2011

SharePoint Configuration Wizard Failing - RPC Server is unavailable

Image
If you encounter this issue, it is clear that your SP machine is unable to get the credentials verified with the Active Directory. Try ipconfig /flushdns - and if it still does not work, do ipconfig /registerdns

Validating Taxonomy Metadata Field in Javascript (Multiple Value Field)

In my previous post, I had mentioned about performing validation of a single value taxonomy field. This script does validation of a multi-value field. This and the previous script works for how many ever taxonomy fields you have in the edit form. Now what I am trying to do is validate and prevent the user from saving the document if the same value repeats in those fields. ******************************* <script type="text/javascript">         function PreSaveAction() {             //alert("calling before save")             var iRef = document.getElementsByTagName("div");             var arr = new Array();             var duplicate = false;             var errors = new Array();             for (var i = 0; i < iRef.length; i...

Validating Taxonomy Metadata Field in Javascript (Single Value Field)

Many of us have requirements of validating Metadata Fields in the client side itself, thus giving a nice little alert message and avoiding save....very interactive and nice.... Find below a script that you can use for the same. All you need to do is, go to your Document Library or List, Go to the Edit Form WebPart Page, add a Content editor WebPart, edit the HTML Source and put this script inside... below the Edit Form and Save the Page back (Page ribbon -> Stop Editing).... The script is inside the PreSaveAction() that is called by the SharePoint Save method, which if returns false, the validation is considered failed and SharePoint does not save the data.. -------------------------------------------------- <script type="text/javascript"> function PreSaveAction() { var iRef = document.getElementsByTagName("div"); var arr = new Array(); for(var i=0;i<iRef.length;i++) {   if(iRef[i].id.indexOf("editableRegion")>=0)   {   ...