Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

Dynamically Populated Option Sets in CRM 2013

$
0
0

Hello,

In my solution, I have an entity with an option set attribute that has no option values by default. A script in the entity form handles the population of the option set dropdown via .addOption. The displayed value of the attribute shows blank or "--" (for CRM 2013). The expected behavior is that when the user selects an item in the dropdown, the field value changes and then displays the selected value. Another attribute (single line of text) then gets that value for later use. This works just fine in CRM 2011.

However, in CRM 2013, selecting a value in the dropdown does not change the displayed value of the field. Putting focus again on the dropdown shows that the default value (blank) is selected (or nothing is selected).

I tried to modify the field value using Xrm.Page/Entity and even JQuery directly on elements to at least to display the selected text, change some attributes, etc. None of this works. It should be noted that when attaching a "change" handler in JQuery to the dropdown, it fires. When specifying a change handler for the field in the form properties, it does not fire.

I have another idea involving creating a workflow that runs periodically or another server process/plugin to dynamically populate a global option set, and then point my entity's option set attribute to that option set. If you're wondering why a workflow, the attribute is supposed to be a list of all existing entity names in the current default solution. If for some reason entities are added/removed from the solution, my option set needs to be brought up-to-date.

Before going down this road, I'm wondering if any of you have encountered this and how you got around it.

Thanks!


Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>