CRM Defaulting A Lookup
When you build a Quote, Opportunity or Order in CRM, you are constantly getting hit with a dialogue box for Unit Of Measure. Many times this extra dialogue box has only one value. That is because most organizations use 1 unit of measure: Each. Wouldn't it be nice if you could establish a Default UOM? Well here is the trick...
The following script should work for establishing your default UOM (OnChange of Product Record). Cut and replace that GUID into the script below. Change the text that says "Each" to whatever the name is of the UOM you want.
To get the GUID of the "Each" you need to go to:
Settings | Product Catalog| Unit Group
Then pick the correct unit group you want the default to come from and select that Unit Group | Units
Now you need to pick the actual default UOM you want to use. Open it up.
Hit <F11> to expose the entire URL. There, in the address, is the GUID for the Default UOM.
var CRM_UOM = 1055;
var oField = crmForm.all.uomid;
var aoItems = new Array();
aoItems[0] = new LookupControlItem("{A7C34D25-6040-4B90-A735-4045C3128FFF}", CRM_UOM, "Each");



Comments