Thursday, July 21, 2011

Set Default PriceList in CRM 2011

function priceList()
{
//Create an array to set as the DataValue for the lookup control.
var lookupData = new Array();
//Create an Object add to the array.
var lookupItem= new Object();
//Set the id, typename, and name properties to the object.
lookupItem.id = ‘{27457CD-3C7C-E011-8E52-1CC1DE7983EB%257d}’;
lookupItem.typename = ‘pricelevel’;
lookupItem.name = ‘test’;
// Add the object to the array.
lookupData[0] = lookupItem;
// Set the value of the lookup field to the value of the array.
Xrm.Page.getAttribute(“pricelevelid”).setValue(lookupData);
}

Regards,
Imran
[MVP CRM] = https://mvp.support.microsoft.com/profile/imran.mustafa

MSN/IM= mscrmexpert@gmail.com
SKYPE= mscrmexpert
BLOG= http://microsoftcrm3.blogspot.com
Linkedin = http://www.linkedin.com/in/mscrmexpert
Twitter = @mscrmexpert