Set Dynamic Selection on Select Box

SUGGESTED

Hi All,

how do I set dynamic selection for Assigned to field on Create new case form?

For example, When I select Team "Logistic", 'Assigned To' field should only shows the users from Logistic Team only. 

Thank you.

  • 0

    Hi Murni, 

    What I suggest is you can use my dynamic selection list and modify it to your needs.
    Here is the original -> https://www.sagecity.com/sage-global-solutions/sage-crm/b/sage-crm-hints-tips-and-tricks/posts/dynamic-selection-lists---rework

    Modifications you need would probably be something like an array list of the results. Also remember that when using the assigned userid field in CRM on the client side you will get a userid and not a username, so please take care of catching for those values and not the names. 

    Building the array list should not be to hard. You can set a list of users per team manually. I don't think the users object is open to REST yet, so you would probably need to set this up manually, however it might be doable with an sdata view (I have not tested this myself). In the end it will make it easier for you to build out the lists you need.

    There are a couple of ways to skin this issue, so explore and you should find a solution easily.

    Hope this helps. Good luck.

  • 0

    I wouldn't do an array because you're not dealing with a standard drop down with a user select field. First I'd swap them over just for a better user experience. ie choose team first then user. The user select doesn't populate on the screen until you click on the magnifying glass or start typing but the list of names is preloaded into the DOM. It's that inbuilt filter on the user select that you need to hook into. I'm not in front of my computer at the mo but I'll look later.

    What version of CRM? 

  • 0 in reply to Vega

    I'm not sure that you'd be able to filter a user selection box even using the client API because the onchange event on that box calls a couple of internal scripts to populate the box. I'd ask developer support for some help on that one.

  • 0 in reply to Vega

    I am on CRM 2019 R2

  • 0 in reply to murni

    why I want to do something like this is because, some user should not be able to see anything from another team (team that is not in his display right).

    But when the user is creating a case, he is still able to choose user from another team, which I don't want. So I want him to only choose user from his own team and the team that he have display right only.

  • 0 in reply to murni
    SUGGESTED

    The team select is just a drop down. If you have a "Support" team or something like that you can use the Search SQL on the assigned user to filter the field to a specific team but set it in the create script on the relevant screen.