Disable attachments for mobile apps by using access control rules.
Before you begin
Role required: adminNote:
- You need to elevate to the security_admin role to
perform these steps. For details on this role, see security_admin
role.
- The script code that is added in the following procedure must be added to
all ACLs on the table.
Procedure
-
Navigate to .
-
Filter the list for <Name> <contains> <sys_attachment> and <Operation> <is> <read>.
-
Find and open the record with the description: Allow read for
records in sys_attachment, if the ACL script returns true.
-
Clear the Admin overrides check box.
-
In the Script field, add the following code to the
bottom of the script:
if( gs.isMobile() ){
answer = false;
}
-
Click Update.
The added code prevents attachments from appearing when the instance is
accessed from a mobile device. If you want to prevent your users from uploading
attachments, continue on to the next steps.
-
Navigate to .
-
Filter the list for <Name> <contains>
<sys_attachemt> and <Operation>
<is> <create>.
-
Find and open the record with the description: Allow create for
records in sys_attachment, if the ACL script returns true.
-
Clear the Admin overrides check box.
-
In the Script field, add the following code to the
bottom of the script:
if( gs.isMobile() ){
answer = false;
}
-
Click Update.
The added code prevents attachments uploading when the instance is accessed from a mobile device.
Note: The ability to rename or delete existing attachments on records in mobile is determined by the access control list (ACL) rules on your instance. For more information on these rules and how they effect
user permissions on your instance, see Access control list rules.