Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

How to make a dropdown list from text field in dynamic CRM

(0) ShareShare
ReportReport
Posted on by 70

Hi I have a requirement that I have a course Column in my entity which i want to make as simple single Line Text field , but when someone enter the course like I entered Mathmatics so when next time i open up the form this field should appear as dropdown and have the values which i have added previously mathmatics in this case , and if i add physics now and on next time when i open up the form i should be able to see both Mathmatics and physics and so on....

can someone assists me how to achieve that in dynamic365 CRM

  • MalikDanish  Profile Picture
    70 on at
    RE: How to make a dropdown list from text field in dynamic CRM

    A dropdown previously configured with its respective options is possible, however a dropdown from a text field is not possible.

    I can have a dropdown but I would like to allow user to populate values in it.

  • Suggested answer
    Inogic Profile Picture
    438 on at
    RE: How to make a dropdown list from text field in dynamic CRM

    Hi,

    To achieve your requirement, you need to write custom code (plugin) and create two fields - 1. Single line text (Subject_String)   2. Option set (Subject). Option set value will be the final value for the subject.
     
    2502.image008.jpg
     
    Users can enter a value in the text field or Option set. If the user selected an option in the option set then no action needed, but when the user entered the value in a text field, in background code will trigger and add an option as a text field value to the option set and clear the text field value.
     
    Code should trigger on record save and update of the subject text field.
     
    In code, check if text field value is available in the option set then set the option as the selected value. Exit code.
     
    If text field value contains data and entered text does not exist in option set then add logic to add new option as text field value to option set. Also, set the newly added option as the selected value for the option set and then clear the text field value.
     
    You can refer to the below link to add value to the options set: 
     
    Hope this helps!
  • Sandesh G Profile Picture
    30 on at
    RE: How to make a dropdown list from text field in dynamic CRM

    Hi MalikDanish,

    In this case you can have separate Entity to hold the course values with all possible values you have beforehand.

    Next step would be to have singleline field on your form, with autocomplete and source as lookup to above entity.

    On-change of above field you can have a js to check if it's new or existing value, and store in some temp variable.

    Later you can write plug-in or MS-flow(powerAutomate) to insert if it's new value based on above temp variable.

  • MalikDanish  Profile Picture
    70 on at
    RE: How to make a dropdown list from text field in dynamic CRM

    Basically I do not want an admin to have the control to add new items and use it as dropdown I want what ever the  user type and saved for every next time it would be available into the list .

  • Suggested answer
    Fubar Profile Picture
    2,752 on at
    RE: How to make a dropdown list from text field in dynamic CRM

    You could do it, but you would have to write a PCF Control to do it (or a Web Resource with custom JS)

    But, would question why you wouldn't just use a Lookup and give the user privileges to create new items..

  • Esteban Coto Alfaro Profile Picture
    on at
    RE: How to make a dropdown list from text field in dynamic CRM

    Hello,

    A dropdown previously configured with its respective options is possible, however a dropdown from a text field is not possible.

    You could: Create a table (entity) where users can create records with the necessary Subject as input.

    i.e. Mathematics, Physics

    Thanks!

    Community Support Team - Esteban

    If this Post helps, then please consider Accept as solution to help the other members find it more quickly.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,278 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,002 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans