0

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);

1 Answer 1

1

It is Xrm.Page.context.

More info here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.