web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Customer Data Type

(0) ShareShare
ReportReport
Posted on by 8
 Hi Community,
 
 
I am facing  one issue   that is for customer data type field  i need to restrict  to select one type of account  records   (for account entity  2 types of accounts are there ).
 
How can i solve this issue please guide me.
I have the same question (0)
  • Suggested answer
    Dengliang Li Profile Picture
    Microsoft Employee on at
    Customer Data Type
    Hi,
     
    You can use JS to restrict the Customer Look up field from displaying contact or account records.
     
    function onload(executionContext) {
        //get customer field control        
        var customerId= executionContext.getFormContext().getControl("customerid");
            function filterCustomerLookup() {
                //Set the Customer field to display only account records.To display the contact record, simply replace account with contact.
                customerId.setEntityTypes(["account"]);
                }
               
                customerId.addPreSearch(filterCustomerLookup);
        }

     
    Best Regards,
    Dengliang Li
     
  • Dengliang Li Profile Picture
    Microsoft Employee on at
    Customer Data Type
    Hi,
     
    Has the issue been solved?
    Have there been any updates? Please feel free to ask me if you have any questions!
    If it has been resolved, can you mark the response as an answer?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 117 Super User 2025 Season 2

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 115

#3
Erin Lubben Profile Picture

Erin Lubben 66

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans