- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2023 08:45 AM - edited 09-20-2023 08:47 AM
Hi ,
I need to give create access to certain group and specific catatog item on sc task.
I have created below script but the script is not returning true , may i know where is the issue here?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 04:32 AM
If you haven't, try with just the one condition being your second condition. Then you're down to ensuring the Name on the Catalog Item is exactly 'Copy Editing' (case-sensitive, no trailing space,...). I tried a mockup of this in my PDI and it worked with both
if (current.parent.cat_item.getDisplayValue() == 'Copy Editing') {
and
if (parent.cat_item.getDisplayValue() == 'Copy Editing') {
where parent in the second example refers to the RITM record since this action is on a related list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2023 11:31 AM
Are you referring to the 'New' button on the Related List for Catalog Tasks on the RITM form, or are you looking on a list view of sc_task? Is the button visible without the script and/or to admins? What I'm getting at, is maybe this script is returning true, but the UI Action condition or a conflicting ACL or something is hiding it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2023 08:00 PM - edited 09-20-2023 08:26 PM
Hi @Brad Bowman Tanks for replying
Yes I am referring to the 'New' button on the Related List for Catalog Tasks on the RITM form.
Yes this button is visible to catalog admins/ Admins?
Here is the screen shot
Acl script works if i give only one condition +
if((gs.getUser().isMemberOf('Administrative Business Center-Agents'))) {
answer = true;
}
else{
answer = false;
}
------------------------------
and it doesnt work if i give && condiion in script =
if((gs.getUser().isMemberOf('Administrative Business Center-Agents'))&&(current.parent.cat_item.getDisplayValue() == 'Copy Editing')) {
answer = true;
}
else{
answer = false;
}
Kindly help me in this .
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 04:32 AM
If you haven't, try with just the one condition being your second condition. Then you're down to ensuring the Name on the Catalog Item is exactly 'Copy Editing' (case-sensitive, no trailing space,...). I tried a mockup of this in my PDI and it worked with both
if (current.parent.cat_item.getDisplayValue() == 'Copy Editing') {
and
if (parent.cat_item.getDisplayValue() == 'Copy Editing') {
where parent in the second example refers to the RITM record since this action is on a related list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 02:32 AM
Thanks a lot for your help, this condition works for me.
answer= (gs.getUser().isMemberOf('ABC GROUP') && parent.cat_item=='7d2ded94db1b77002ed03df3399619e7');