Newer Version Available
Allow Users to See an External Object's Records
This restriction rule allows active Salesforce users to see the records of an external
object called Purchase Order. The rule uses a field called IsClosed on Purchase Order records in
its record criteria.
| Available in: Lightning Experience in Enterprise, Performance, Unlimited, and Developer Editions |
Tooling API
1{
2 "FullName":"purchase_orders_restictionrule",
3 "Metadata": {
4 "active":true,
5 "description":"Allows accounting department users to access open purchase order records from external system.",
6 "enforcementType":"Restrict",
7 "masterLabel":"OpenPurchaseOrderRecords",
8 "recordFilter":"IsClosed__c = ‘false’",
9 "targetEntity":"PurchaseOrder__x",
10 "userCriteria":"$User.Department = ‘Accounting’",
11 "version":1
12 }
13}Metadata API
1<?xml version="1.0" encoding="UTF-8"?>
2<RestrictionRule xmlns="http://soap.sforce.com/2006/04/metadata">
3 <active>true</active>
4 <description>Allows accounting department users to access open purchase order records from external system.</description>
5 <enforcementType>Restrict</enforcementType>
6 <masterLabel>OpenPurchaseOrderRecords</masterLabel>
7 <recordFilter>IsClosed__c = ‘false’</recordFilter>
8 <targetEntity>PurchaseOrder__x</targetEntity>
9 <userCriteria>$User.Department = ‘Accounting’</userCriteria>
10 <version>1</version>
11</RestrictionRule>