Restrict Lookup Types for Regarding Lookup on Activities


With the following couple of lines of code, we can easily restrict the Lookup Types in Lookup Dialog.

var regarding = Xrm.Page.getAttribute(“regardingobjectid”);
regarding.setLookupTypes([“account”,”contact”]);

RegardingDialog

Advertisements

About Kishore Dhanekula

MS Dynamics CRM and .NET Architect
This entry was posted in CRM, Java Script, Ms Dynamics CRM 2013, MS Dynamics CRM 2015, MS Dynamics CRM 2016 and tagged , , , , , , , , , , , , , , , . Bookmark the permalink.

2 Responses to Restrict Lookup Types for Regarding Lookup on Activities

  1. Javed says:

    Hi Kishore Dhanekula

    The above code works very well, thank you.
    But I am not able to restrict entities in mobile phone. Could you please share code to support on phone.
    Thank you 😊

  2. Jobin says:

    Xrm.Page.getControl(“regardingobjectid”).getAttribute().setLookupTypes([“contact”]); don’t for CRM 2016

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s