// Sets the lookup value for a certain field
function SetLookupValue(fieldName, id, name, entityType) {
if(fieldName != null) {
var lookupValue = new Array();
lookupValue[0] = new Object();
lookupValue[0].id = id;
lookupValue[0].name = name;
lookupValue[0].entityType = entityType;
Xrm.Page.getAttribute(fieldName).setValue(lookupValue);
}
}
// USE
SetLookupValue("new_blogid", "{FD140AAF-4DF4-11DD-BD17-0019B9312238}", "CRM Stuff", "new_blog");
Wednesday, January 26, 2011
Set a lookup value in CRM 2011
Subscribe to:
Post Comments (Atom)
0 comentarii:
Post a Comment