Tech Support > Microsoft Windows > Windows CRM > javascript + onchange + delete value from lookup
javascript + onchange + delete value from lookup
Posted by missupport on May 14th, 2008


Hello,

I would like to know if it is possible to delete a value in a lookup through
javascript.

Following scenario:

On the contact form I have a picklist with several values and a lookupfield
for the accounts.
Now I want, when a certain value is selected in that picklist, that the
value in the lookup of the account is deleted.

Is this possilbe to do with javascript in an onchange event?

thank you in advance.

Posted by Nicolas Pagès on May 14th, 2008


In the onchange event, when your picklistvalue is selected, simply put the
following line of code :

crmForm.all.parentcustomerid.DataValue = null;

This will delete the value from the lookup field to account.

Hope this helps

--
Nicolas Pagès


"missupport" wrote:


Similar Posts