I'm setting up an ribbon bar button enable rule that is not working. I think I might be misunderstand how these OR rules work. Can someone offer some suggestion or maybe tell me what I am doing wrong? Any help or suggestions are much appreciated.
Here's what I have setup. I have a Lead where I do not want to allow it to be reactivated depending on field's value. I basically have different types of Leads. If a user has qualified a Lead of type say 0,1 I don't
want to allow those to be reactived. But if they are of say type 2, 3, or 4 I want to allow it. I can get that working and it's fine. However, I also want to allow any user that has a security role of "System
Administor" to be able reactive any Lead that they want. I can also get that to work by itself. However, if I merge these two using an OrEnableRule, they don't work well together. Here's what I have setup as an enable rule on the
"Reactive Lead" button. Any idea why this is not working?
Enable Rule:
CustomRule - Fires off a JavaScript function that returns true/false depending on if the user has the admin role.
OrEnableRule
OrGroup
ValueRule - type is 2
OrGroup
ValueRule - type is 3
OrGroup
ValueRule - type is 4
If I remove the CustomRule, the logic works but of course it doesn't allow it for the admins and type 0, 1. If I remove just the OrEnableRole, it works to allow it for all admins. But if I have both, the button is always disabled. When
I test this, I am using an admin account, so it should override and allow it to be enabled. But it does not.
Am I using the OrGroup wrong or setting up the EnableRule incorrectly? How might you approach something like this?
Jon Gregory Rothlander