Button is visible for certain groups at specific stages
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2024 04:50 AM
Hi there,
Firstly, so sorry it's a bit general but having to omit data.
I have a requirement where I need two groups of users to be allowed access to a 'cancellation' button. How would I go about this as currently the button is only visible for admin?
In addition, I want to be able to ensure that even after approval of a a process that this can be cancelled on the original record in case it was approved in error.
Furthermore, I want to implement a process where pressing the cancel button, cancels the approval, but also prompts the user to justify this cancellation in worknotes. How would I make this appear from the trigger of the cancel button?
Any pointers would be much appreciated.
Kind regards
G
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2024 04:54 AM - edited 01-16-2024 04:55 AM
HI,
You need to have the ui action condition something like this
((current.state=='new' && gs.getUser().isMemberOf(current.assignment_group.toString())) || ((current.state=='open' && gs.getUser().isMemberOf(current.assignment_group.toString()))
You have to add multiple OR conditions to show the button on certain states and to certain groups.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2024 06:20 AM
Thank you so much for your response. Are there any other ways to specify the user other than groups they may be part of? I want to specify that if the user is the final approver then they should be able to access this UI action. Is there a way to do this or is it too ambitious? As the user may be the 1st or the 3rd user and also the final user, depending on prior conditions.
Thank you again,
G
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2024 06:25 AM
its always better to specify the group instead of user, here you have mentioned about final approver, not sure how you would identify FINAL there.
Assuming you can , then it is possible but the condition might get too big to be include din the condition field, so instead you can call a script include from the condition field and put all the logic there.
new <scrptIcludeName>().<methodName>();
In the script include return true/false.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2024 06:30 AM
This is great advice, thank you and I will investigate further with this in mind.
G