Newer Version Available
Allow Users to See Only Records Owned by Same Profile
This restriction rule allows active users to only see events owned by users with the
same profile. You can use dot notation to traverse object and field relationships in the
recordFilter field.
Tooling API
1{
2 "FullName":"restictionruleeventsprofile",
3 "Metadata": {
4 "active":false,
5 "description":"Allows active users to see only events owned by users of the same profile.",
6 "enforcementType":"Restrict",
7 "masterLabel":"Events Owned by Same Profile",
8 "recordFilter":"Owner.ProfileId = $User.ProfileId",
9 "targetEntity":"Event",
10 "userCriteria":"$User.IsActive = true",
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 active users to see only events owned by users of the same profile.</description>
5 <enforcementType>Restrict</enforcementType>
6 <masterLabel>Events Owned by Same Profile</masterLabel>
7 <recordFilter>Owner.ProfileId = $User.ProfileId</recordFilter>
8 <targetEntity>Event</targetEntity>
9 <userCriteria>$User.IsActive = true</userCriteria>
10 <version>1</version>
11</RestrictionRule>