Wednesday, August 15, 2012

Parse CRM Date with JavaScript


A JavaScript function to parse a CRM Date that returns a JavaScript Date object. This method can be used in both 2011 and 4.0


  //parsing

  function parseDate(xmlDate)
   {
     if (!/^[0-9]{4}\-[0-9]{2}\-[0-9]{2}/.test(xmlDate)) {
      throw new RangeError("xmlDate must be in ISO-8601 format YYYY-MM-DD.");
     }
    return new Date(xmlDate.substring(0,4), xmlDate.substring(5,7)-1, xmlDate.substring(8,10));
   }

  // and using

 // In CRM 4.0
 
 if(retrievedOpp.attributes["estimatedclosedate"] != null && retrievedOpp.attributes["estimatedclosedate"] != undefined){
 crmForm.all.new_estimatedclosedate.DataValue = parseDate(retrievedOpp.attributes["estimatedclosedate"].value);}

  // In CRM 2011

if(retrievedOpp.attributes["estimatedclosedate"] != null && retrievedOpp.attributes["estimatedclosedate"] != undefined){
Xrm.Page.data.entity.attributes.get('estimatedclosedate').setValue(parseDate( Xrm.Page.data.entity.attributes.get('new_closedate').getValue()));}
  

Reference :- http://crmpro.blogspot.in/2009/11/javascript-function-to-parse-xml-iso.html

Wednesday, August 1, 2012

Point the Email router server after Installing CRM 2011 server



Normally when we install CRM 2011 the setup will be asking for the Email Router at that time we could have just skipped the step... 
Later if you want to point your email router server from your application server means what we can do??
There is an option specified while we install the CRM itself it is told that we can install the email router later and we can configure the same while installing crm itself they have mentioned the way over there


Open the Active directory 
 In you domain Navigate to CRM 
 
 Right click on the PrivUserGroup and click on properties


 It will be opening a new window in that select members tab and click on Add

 Select the object type
 Enter your router server name
 Click ok...
 

 Now its  pointed :)


 Thanks to MR Kanaga Raj Pandian and Mr Akilan S !!