Error on inserting Child record on custom object which is having Master Detail relationship with other Custom Object.
I have two custom Objects x and Y which are in Master Details Relations. There is on field on Custom Object Y say (z) which having Master detail Relation ship with x.
when I am inserting Y record without filling the 'z' field system throwing an error "System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing"
When i give z=x.id and do insert, its throwing an error saying "Field does not exist"...
Let me know how can i fix it.