Hi All;
How to copy lookup value from one foeld to another in CRM 4.0?
Any help much appreciated
Thanks
Pradnya
Pradnya07
var
lookupObject =
new
Object;
lookupObjectArray =
Array();
lookupObject.id =
"21EC2020-3AEA-1069-A2DD-08002B30309D"// Put the id of source lookup field like crmForm.all.new_FEILDNAME.DataValue[0].id
;
lookupObject.name =
"John Doe"
;//
lookupObject.typename = "systemuser";//Put entity name of source lookup like "contact";
lookupObject.typename =
"systemuser"
lookupObjectArray[0] = lookupObject;
crmForm.all.new_DESTINATIONFIELDNAME.DataValue = lookupObjectArray;
crmForm.all.new_DESTINATIONFIELDNAME.ForceSubmit = true;
crmForm.all.new_
.ForceSubmit =
true
if you want to put in a text field than
crmForm.all.new_DESTINATIONFIELDNAME.DataValue = crmForm.all.new_LOOKUPFIELDNAME.DataValue[0].name ; //to putlate the name of lookup
crmForm.all.new_DESTINATIONFIELDNAME.DataValue =
crmForm.all.new_LOOKUPFIELDNAME.DataValue[0].name ; //to putlate the name of lookup
Regards Faisal