+ Start a Discussion
DeptonDepton 

issue with master details and account approvals

Hi,

I have a custom Object “B” and Account is the master detail

When I submit an Account for Approval, Salesforce blocks any related list that has a master detail to the Account. So I no user can edit “B”

I can change the master detail to a look up field BUT then “B” won’t be controlled by parent but, "Private", "Read-only" OR "Public”

Is there any way to change relationship from a Master Detail to Look up and keep security as per account visibility? so "Controlled by Parent”

Thank you

Best Answer chosen by Admin (Salesforce Developers) 
JitendraJitendra

Hi,

The behavior what you explained is what expected from Master detail relationship. If master record locked then child record will also.

 

If you want same level of security then following can be done.

 

  1. Convert Master to Lookup.
  2. Set same Object level permission for Object B and Account in all profiles.
  3. Set Same OWD as of Account for Object B.
  4. Create After Insert Trigger on Object B.
  5. In trigger, share the record as per requirement using Apex based Sharing.

Read this tutorial for apex based sharing : http://wiki.developerforce.com/page/Using_Apex_Managed_Sharing_to_Create_Custom_Record_Sharing_Logic