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.


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

1 Answer 1


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

You must log in to answer this question.

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