locked
Based on security roles Option set value - Dynamics CRM 2013 RRS feed

  • Question

  • Hello,

    Based on security roles the option set value would be clear/added through JavaScript in Dynamics CRM 2013 online

    Thanks


    Regards.

    Thursday, April 9, 2015 8:25 PM

Answers

  • The XrmServiceToolkit has a function XrmServiceToolkit.Soap.IsCurrentUserInRole().

    Sends a synchronous request to check if the current user has certain roles. Passes name of role as arguments. For example, IsCurrentUserInRole('System Administrator'). Returns true or false.

    You could check a user's security roles this way to populate/hide/show your option set.

    Friday, April 10, 2015 7:44 AM
  • Hi,

    Below link can be helpful

    http://www.microxrm.blogspot.in/2012/05/hiding-optionset-picklist-values-based.html

    Thanks


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Thanks and Regards, Mohammad Yusuf Ansari http://microxrm.blogspot.in


    Saturday, April 11, 2015 12:59 PM
  • Please remove comma and pass the number in int form eg. 717690006. Also please make sure the id is correct. The number can change from organisation to organisation.

    regards

    Jithesh

    Sunday, April 12, 2015 1:09 AM

All replies

  • The XrmServiceToolkit has a function XrmServiceToolkit.Soap.IsCurrentUserInRole().

    Sends a synchronous request to check if the current user has certain roles. Passes name of role as arguments. For example, IsCurrentUserInRole('System Administrator'). Returns true or false.

    You could check a user's security roles this way to populate/hide/show your option set.

    Friday, April 10, 2015 7:44 AM
  • Thank you Jochen. Do you have any link for adding/removing value from Option Set which actually happening based on the user's role. I am browsing through XrmServiceToolkit till that time.

    Thanks in advance.


    Regards.

    Friday, April 10, 2015 2:36 PM
  • Hi,

    Below link can be helpful

    http://www.microxrm.blogspot.in/2012/05/hiding-optionset-picklist-values-based.html

    Thanks


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Thanks and Regards, Mohammad Yusuf Ansari http://microxrm.blogspot.in


    Saturday, April 11, 2015 12:59 PM
  • Thank you. However while executing  PickListControl.removeOption(717,690,006) is showing as undefined. Should it be value?

    Regards


    Regards.

    Saturday, April 11, 2015 5:01 PM
  • Please remove comma and pass the number in int form eg. 717690006. Also please make sure the id is correct. The number can change from organisation to organisation.

    regards

    Jithesh

    Sunday, April 12, 2015 1:09 AM
  • Thanks all for your time.


    Regards.

    Monday, April 20, 2015 8:13 AM