0

when I create a child record linked to the parent and that child has lookup to Contact X, I want to share the parent with contact X

How can I do that?

1
  • One clarification here. Is it possible with authenticated website license with without sharing in VF page , to do editing on record which he don't have permission. Becuase actually the user wont have access to that record.
    – user8523
    Commented May 24, 2014 at 18:46

1 Answer 1

2

Your order of action sounds wrong? Probably you mean something like "when I create a child record linked to the parent and that child has lookup to Contact X, I want to share the parent with contact X".

It doesn't look like you can achieve this with just configuration (for example criteria-based sharing rule) because these can be used only to share with Roles/Groups, not individuals. Can you use Apex managed sharing? There's a nice example of an "after insert" trigger in the docs, you'd have to create one like that on the child object.

Another option would be to simply route all viewing / edititng of the object through VF page and controller that would have "without sharing" modifier and you'd be responsible for proper data filtering.

2
  • Yep, you are right. But my current license is "Authenticated Website" which doesn't support Apex Managed Sharing. Seems like I need customer portal manager license.
    – doga
    Commented Nov 5, 2012 at 7:51
  • @doga were you able to find a list of all the licenses supported by apex managed sharing?
    – Phil B
    Commented Jul 11, 2013 at 17:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .