- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2017 11:34 AM
I'm trying to hide the Assign to Me UI Action in sn_customerservice to where it will only show after an Assignment Group is selected and if the current user is a member of the Group. I have tried using gs.getUser().isMemberOf(current.assignment_group) as the condition but it is not working. I can use an OnChange client script to do this but it does not work if the Assignment Group field is empty. Does anyone know of another UI Action condition that would solve this?
Solved! Go to Solution.
- Labels:
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2017 11:40 AM
isMemberOf() uses a display name, so try this instead...
gs.getUser().isMemberOf(current.assignment_group.getDisplayValue())

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2017 06:22 AM
You're close Richard.
current.assigned_to != gs.getUserID() // current assigned_to is not me
current.assigned_to.nil() // current assigned to is empty
put them together
current.assigned_to != gs.getUserID() || current.assigned_to.nil() // current assgined_to is not me or empty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2017 07:50 AM
Fantastic, many thanks as always.