You need to sign in to do that
Don't have an account?
girbot
Criteria Based Sharing: Using Current User ID
Hi Y'all,
Is it possible to have a criteria based sharing rule which references the current user id?
For example we have an custom object, called events, and we would like the presenters to only see the events they are running.
I have had a look at the criteria based sharing, but have not been able to reference the current user id to achieve this.
Any ideas?
Thanks in advance :)
why to have a criteria based sharing rule for this. If you give the org wide defaults to private then the users can access only their records.
If problem is not solved can you explain the thing more clear?
Regards,
Shravan
Criteria cannot be dynamic, It should be static.
So you cannot give the criteria with logged in User Id.
Regards,
Shravan
Girbot,
Apex managed sharing would help you achieve this. You can dynamically create shares for the presenter to his/her events.
events__share s = new events__share();
s.UserOrGroupId = events__c.presenter;
s.RowCause = 'manual';
s.ParentId = events__c.Id;
s.AccessLevel = 'Read';
insert s;
Hope this helps...