Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Record Specific ACL on Attachment

Mathieu8
Mega Guru

Hi Community,

 

I have a custom table with records that I want to store a pdf of a legal document that has information that should only be read by a specific administrative group and the user which has signed the document.

 

Is there anyway to do this with ACLs on the custom table without making modifications to the sys_attachment and sys_attachment_doc tables?

 

Thanks,

 

-Mathieu

6 REPLIES 6

Harsh Vardhan
Giga Patron

That post is only regarding visibility. It does not provide any security.

then you must have to make some changes in sys_attachment table ACL

vinothkumar
Tera Guru

I tried the same for HR case,  in the Read ACL for sys_attachment. Can you try something like this. 

 

    //Check HR Case if user created attachment

 

  if(current.table_name == 'hr_case'){

          if(gs.hasRole('hr_basic')){

                     return true;

          }

 

        else{

 

            return false;

 

          }

 

  }