Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Account Number Selection showing Contacts

(0) ShareShare
ReportReport
Posted on by 5,076
  • When creating a new case and selecting a customer “in this case customer 201301” this is what they see. All those records are the customer contacts but they want the customer name only.

8080.test1.jpg

1055.test2.jpg

They have to scroll all the way down to find the customer name.

*This post is locked for comments

  • Verified answer
    PS Profile Picture
    PS 23,577 on at
    RE: Account Number Selection showing Contacts

    Go to settings>>customisation >> customise the system>> entity>> account >> views >> quick find view>> add or remove columns

  • sandeepc Profile Picture
    sandeepc 5,076 on at
    RE: Account Number Selection showing Contacts

    40.jpg 

    XO COMMUNICATIONS =Account name  

    Cutomer = relationship type

    201301=account number     Can i get only account name and account number as marked in red.. for the above lookup records

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Account Number Selection showing Contacts

    In you code inverted commas ' and double quotes " are not correct. It's an issue of copy paste.

    It can't be done using realtime workflow as clicking on lookup is client side operation.

    Use below code:

    function defaultcustomer(){
    Xrm.Page.getControl("customerid").addPreSearch(addFilter);
    }
    function addFilter()
    {
    var customerAccountFilter = "<filter type='and'><condition attribute='contactid' operator='null /></filter>";
    Xrm.Page.getControl("customerid").addCustomFilter(customerAccountFilter, "contact");
    }


  • sandeepc Profile Picture
    sandeepc 5,076 on at
    RE: Account Number Selection showing Contacts

    can i write real time workflow to acheive this

  • sandeepc Profile Picture
    sandeepc 5,076 on at
    RE: Account Number Selection showing Contacts

    function defaultcustomer(){

    Xrm.Page.getControl(“customerid”).addPreSearch(addFilter);

    }

    function addFilter()

    {

    var customerAccountFilter = “<filter type=’and’><condition attribute=’contactid’ operator=’null’ /></filter>”;

    Xrm.Page.getControl(“customerid”).addCustomFilter(customerAccountFilter, “contact”);

    }

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Account Number Selection showing Contacts

    The screenshot looks fine. Share the code

  • sandeepc Profile Picture
    sandeepc 5,076 on at
    RE: Account Number Selection showing Contacts

    any suggestions?

  • sandeepc Profile Picture
    sandeepc 5,076 on at
    RE: Account Number Selection showing Contacts

    4201.111.PNG

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Account Number Selection showing Contacts

    Share your code and where are you adding your javascript?

  • sandeepc Profile Picture
    sandeepc 5,076 on at
    RE: Account Number Selection showing Contacts

    how to add a custom filter to display only accounts in customer lookup???? i tried javasscript but its not affecting anyhting

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,489 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans