Reputation: 383
I have to pass data to lookup field in CRM.
There is section with the buttons i made on account card. I also made some lookup fields on the account card. On click i have to pass some data to lookup field.
Here is the code i use to pass the data to lookup field, but i don't know how to get info about current page context. Is there any function doing that?
var lookup = new Array();
lookup[0] = new Object();
lookup[0].id = recorid;
lookup[0].name = recordname;
lookup[0].entityType = entityname;
Xrm.Page.getAttribute("attributename").setValue(lookup);
Upvotes: 0
Views: 1284