- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 08:41 AM
Hi there,
I'm trying to restric ACLs permissions for Demand RIDACs items according to demand record permissions. I need to use the canWrite() function and it should look the parent demand record. I have builded a script but it doesn't work
var answer=false;
// Check if current user can edit parent
if (parent.canWrite())
{
answer=true;
}
Do you know what is wrong?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2023 04:42 PM
Ok, I have found the solution. First you need to refert to the parent record with getRefRecord() and then check permissions with canWrite so:
var parent= current.parent.getRefRecord();
answer = parent.canWrite();
it should work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 11:06 AM - edited 07-25-2023 11:49 AM
@Leonel Sandroni ,
What if you try with current.parent.canWrite()?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 11:15 AM
Give permissions to write demand task and ridacs. If any user has write permissions for demand records then he should be able to write demand task. The script in the write acl for demand task should check write permissions on parent demand record.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 11:19 AM
Try
var answer=false;
// Check if current user can edit parent
if (current.parent.canWrite())
{
answer=true;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 11:45 AM