- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2020 06:05 AM
Hi All,
There is UI Action on problem table "Start Fix" and its out of box condition is:
current.canWrite()&&(current.state != ProblemState.STATES.FIX_IN_PROGRESS)&&new ProblemStateUtils().
validateStateTransition(current,ProblemState.STATES.FIX_IN_PROGRESS)
I wanted to it to be visible to "XYZ" group only, so i added it like:
current.canWrite()&&(current.state != ProblemState.STATES.FIX_IN_PROGRESS)&&new ProblemStateUtils().
validateStateTransition(current,ProblemState.STATES.FIX_IN_PROGRESS)&&gs.getUser().isMemberOf('XYZ')
This was working as i wanted but even it is restricting to "admin" as well if admin is not member of XYZ.
So again i changed the condition as below but it is still working as before, not showing "Satrt Fix" ui action to admin if admin is not member of XYZ.
current.canWrite()&&(current.state != ProblemState.STATES.FIX_IN_PROGRESS)&&new ProblemStateUtils().
validateStateTransition(current,ProblemState.STATES.FIX_IN_PROGRESS)&&((gs.getUser().isMemberOf('XYZ'))||(gs.getUser.hasRole('admin')))
Please check and suggest me the solution.
Thanks
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2020 08:31 AM
Hi Ajeet,
Try replacing with this in your condition. ||gs.getUser().hasRole('admin');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2020 08:27 AM
Hi Ajeet,
Try replacing with this in your condition. ||gs.getUser().hasRole('admin');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2020 08:31 AM
Hi Ajeet,
Try replacing with this in your condition. ||gs.getUser().hasRole('admin');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2020 11:30 PM
Hi Knight,
Thank you knight, now it is working. I missed () in gs.getUser().
Thank you