Ever wish you could dynamically set the available values of a field to reflect picklist values?
Sure, there are ways of filtering out unwanted options based on some filter criteria, but if you’re dealing with data constraints that are constantly changing (ex: the brands of cars sold by a merchant at a particular location) it can get pretty messy, pretty quickly.
That said, the best way to achieve ease of consistency and maintainability when it comes to data is through the use of Global Option Sets and Auto-completion.
First, you’ll want to create a Global Option Set that has the values you’d like to leverage.
Lastly, we’ll need to ensure that the text selected matches one of the available picklist values before saving the record:
And that should do it!
NOTE: For enhanced performance, you can make “picklistOptions” a global variable, and only populate when/if your picklist selection criteria changes.
Be sure to subscribe to our blog for more helpful Dynamics 365 tips!
Happy Dynamics 365’ing!