CRM 3.0 Tips and Tricks

//remove the braces from the guid
sid = sid.replace(/[{,}]/g, "");

*******************************************************************
//good old form html
var asdf = crmForm.all.new_caseid_d.outerHTML
crmForm.all.new_test.DataValue = asdf;

*******************************************************************
//get form guid
var objectidguid = crmForm.ObjectId;

*******************************************************************
//working with date and times
var cd = new Date();
cd = crmForm.all.new_courtdate.DataValue;
var year = cd.getYear();
var month = cd.getMonth();
var day = cd.getDate();
var addhourscd = new Date(year, month, day, 8, 0, 0);
crmForm.all.new_courtdate.DataValue = addhourscd;

*******************************************************************
//getting guid from lookup
var singuid = new Array();
singuid = crmForm.all.new_caseid.DataValue;
var guid = singuid[0].id;

*******************************************************************
//Testing for NULL values
if ((crmForm.all.currentcost.DataValue) != null)
{
alert("not null");
}
else
{
alert("is null");
}										

<<Back
Phone 1(888) 574-EASI | Email info@easiintl.com
Site Map
Copyright © 2010 | Enterprise Alliance Systems, Inc. | Microsoft Dynamics CRM Implementation and Customization | Houston, Texas

Valid XHTML 1.0 Transitional