+ Start a Discussion
Adil AleemAdil Aleem 

Required Field Missing while uploading from data loader

Can I populate required field in before trigger dynamically while uploading from dataloader and not giving it in file(no column for that field)?

For e.g.
I have master relationship(Field C) in Object A to Object B. I want to insert records of Object A via dataloader but I don't have column for Field C in my upload file. I am populating Field C(Master Relationship on Object B) in before trigger. It is showing me Required field Missing "Field C".How can I overcome this?
Sai Ram ASai Ram A
Hi

Because Field is Mandatory you will not be able to insert child record untill you associae it with parent!!

Correct my Understading, ObjectB is Master of Detail ObjectA with [Field__c].
Steps to insert record are 
1. Populate Master records in ObjectB
2. Associate ParentId's(ObjectB) in you Detail ObjectA [Field C - Id's of ObjectB]

As Master-Detail relationship requires Parent Id to insert Child records, where as Lookup relation doesn't 

Hope this Helps

Thank you
BLearn