Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Customer Data Type

(0) ShareShare
ReportReport
Posted on by
 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.
  • Dengliang Li Profile Picture
    Dengliang Li 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?
  • Suggested answer
    Dengliang Li Profile Picture
    Dengliang Li 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
     

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,904 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,605 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans