Role-based dropdown not working

We have a need for role-based dropdown control around the account_type DD

Sugar introduced Role-based dropdowns circa version 7.6 and an issue was raised in August 2017 (that is over 2 years ago) - Bug 79265

This shows itself that if the user does not have access to the DD value present in the record, then the field value does not display at all - this is unacceptable.

Not mentioning my FRUSTRATION at the lack of a fix on a fundamental error which obviously got through QA over 2 years ago, does anyone have suggestions for an alternative approach please.

I have seen some posts around coded solutions which would be of interest. I suspect that might be the only route as my work with dependency files (eg SET OPTIONS) does not appear to include Role based functionality.

Thanks

Neil

Parents
  • Hi Neil Conacher 

    Definitely the Dependency SetOptions is a good strategy. Indeed we have had been configuring such features for different scenarios, including that issue.

    In order to make it working like a charm you need to setup the custom sugarLogic isUserInRoleList.

    Place the attached file into folder custom/include/Expressions/Expression/Boolean/

    Then go to Admin -> Repair -> run the following actions:

    • Quick Repair and Rebuild
    • Rebuild Sugar Logic Functions
    • Rebuild JS Grouping Files
    • Clear Additional Cache

    The sugarLogic function isUserInRoleList gets a list of roles by name and returns a bollean, example:

    isUserInRoleList(createList("Tracker", "Sales Administrator"))

    This way you are able to setup specific dropdown lists for specific roles disregarding the user within.

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Hi André,

    Thanks very much for this - I will have a look at it Friday and report back - sounds very promising.

    Neil

Reply Children
No Data