0
votes

I've set up contacts in leads successfully but when a user adds a new contact it wont auto fill in the parent lead field i created to link the contact to the lead.

Does anyone one know what script i could use onload that will auto fill a filed on the lead called Parent Lead. It needs to update the contact field with the leads primary account.

Hope that makes sense.

At the moment the user has to find the lead through the custom lookup field.

1
What way is your relationship? usually a contact/account would have many leads so one to many!Richard Dewhirst

1 Answers

0
votes

Check your relationship ... 1to1, 1tomany, manytomany?

here is the code to populate a lookup field anyway:

 var value = new Array();
 value[0] = new Object();
 value[0].id = idValue;
 value[0].name = textValue;
 value[0].entityType = typeValue;

Xrm.Page.getAttribute("fieldName").setValue(value);