Friday, 12 June 2009

SDK: Set Lookup Value

from: sdk\client\howto\usinglookups

// Create a lookupItem to store the values that you want to set to a target lookup control.
var lookupItem = new Array();

// Specify the values on the signature of LookupControlItem. These values are the GUID of pricelevel, the type code of pricelevel, and the name of the lookup value.
lookupItem[0] = new LookupControlItem ("{F31BB38A-0EC0-403F-99A6-3AF469D7D76E"}, 1022, "Retail");

// Set the form control value to the lookupItem that you just created.
crmForm.all.pricelevelid.DataValue = lookupItem ;

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home