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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Lookup field vs Dropdownlist

(0) ShareShare
ReportReport
Posted on by

I have a custom entity named as Company with only one field Company_Name.  Only Data Administrator role can add a Company record.

In other entity form, a Company Dropdownlist with sorted entries from the Company entity is to be formed for user to select a Company Name.  Please advise on how to form such a Dropdownlist.

Lookup field is an option to me but it provides user with capability to add new Company record, can this be disabled?

Regards

Tiong

*This post is locked for comments

I have the same question (0)
  • Mahendar Pal Profile Picture
    45,095 on at

    Hi Tiong,

    You can do this through js code or you can develop a html web resource for this where you can show all of your company names ( you can write Odata query to read all company names) under dropdown so that user can select it.

    Check this:mahenderpal.wordpress.com/.../get-customer-address-in-sales-entities-using-html-web-resource

    mscrmblogger.com/.../crm-2011-making-the-state-field-a-drop-down

    Thanks

  • Community Member Profile Picture
    on at

    Thank you.  It works.

  • Community Member Profile Picture
    on at

    Sorry,

    I just discover that your proposed solution is limited to the maximum of 50 records.  How to overcome this limitation?

    Thank you

  • Community Member Profile Picture
    on at

    Sorry,

    I just discover that your proposed solution is limited to 50 records.  How to go beyond to this limit?

    Thanks.

  • Verified answer
    Mahendar Pal Profile Picture
    45,095 on at

    No, It's not limited to 50 records only, but it OData brings 50 records per page, so if you have more then 50 records you need to retrieve all the pages, you can check for more pages using  _next . So you need to modify code little bit.

    Check these sample it will help you:

    www.xrmlabs.com/.../How-to-retrieve-more-than-50-records-through-OData-in-CRM-2011.

    congruentdynamics.blogspot.ae/.../retrieving-more-than-50-record-using.html

    Thanks

  • Community Member Profile Picture
    on at

    Hi Tiong,

    if the user has no right to create the company record, then it shuold be OK anyway, right ?

  • Suggested answer
    Hamzeh Zawahreh Profile Picture
    3,674 on at

    dear Tiong

    you can do this according to your requirement without adding any html code.

    you said only admin can  add company name, so other security role must not have privilege to add in this entity so the users can't add records.

    ok

  • Suggested answer
    Community Member Profile Picture
    on at

    Thank you.  Fixed my code.

  • Community Member Profile Picture
    on at

    Can I use the said dropdownlist in CRM View, so that user can select a Company entry from it and used as a filtering criteria in the View?

    Regards

  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    Assuming you are referring sub grid, so yes you can do that, you can use Java script to filter it using fetchxml based on company selection, Check below post it will help you

    mahadeomatre.blogspot.ae/.../dynamically-filter-form-sub-grid-to.html

    Thanks

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Varsha deshpande Profile Picture

Varsha deshpande 5

#2
JS-09031509-0 Profile Picture

JS-09031509-0 3

#3
Ciprian  P Profile Picture

Ciprian P 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans