i am trying to autopolulate fields on a form based on a contact selected as a lookup field... i have tried a code but doesn't seem to work properly... would anyone kindly help me with regards to this...
if (crmForm.all.exordia_firstname.DataValue == null)
{
var lookupfield = crmForm.all.cutomerid.DataValue;
if (lookupfield [0]! = null)
{
var lookupvalue = lookupfield [0]. firstname;
}
else
{
var lookupvalue = " ";
}
crmForm.all.exordia_firstname.DataValue = lookupvalue;
}
i have tried this code on the onchange event of the lookup field of customer in a case. and doesn't seem to work.
your help will be greatly appreciated.
thank you in advance
*This post is locked for comments
I have the same question (0)