- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2021 12:50 AM
Hi all, I have a list field in a form where multiple users can be entered. In the Related List I would like that only users from the List field can create new records. Can anyone tell me how best to build the script for this?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2021 01:00 AM
Hi,
Try this
var answer ;
if (parent.<field name with users>.indexOf(''+gs.getUserID())>-1) { //Do not remove the 'New' button
answer = false ;
}
else { //Remove the 'New' button
answer = true ;
}
answer ;
-Anurag
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2021 01:00 AM
Hi,
Try this
var answer ;
if (parent.<field name with users>.indexOf(''+gs.getUserID())>-1) { //Do not remove the 'New' button
answer = false ;
}
else { //Remove the 'New' button
answer = true ;
}
answer ;
-Anurag
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2021 01:03 AM
Hi,
Try creating ACL of type create on that table to allow creation for certain list users.
Mark as Correct & Helpful, if applicable.
Thanks,
Vikram