3

need suggestion for below query,

i have two object with master detail relation(Object A is Parent, Object B is Child)

in one of my profile i have Object A is only Read access,and want to create object B record.

when i try to create record it gives insufficient access error.

it will work fine if i give modify all permission for object A for same profile.

other than this solution, do we have any solutions.

Thanks

  • 2
    ad without sharing in your class and give it a try. – Tushar Sharma Jan 12 '16 at 11:50
  • How are you creating these objects? by code? by vf or by standard pages? – Salesforcesmarty Jan 12 '16 at 12:47
  • Hi Tushar, i can't use withoutsharing, other than this we have any other solution – Vishwa Jan 13 '16 at 7:16
  • hi salesforcesmarty, im creating records from controller using VF page – Vishwa Jan 13 '16 at 7:17
2

When creating a field with a Master-Detail relationship, you can select the access requirements for editing the master record in the sharing section. To have edit access to the child with read only access to the parent, you need to change the default "read/write" to "read". enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.