0

I need a little help with a data loader import. I have a .csv with account records and some of the fields need to have a value, they're required. I need to know how can I import the file because there is also a process that creates related records of a different object and this object has those same values required also therefore the process triggers and throws an error because on the import there is no value for those fields. help, please! :(

1 Answer 1

0

So, one needs to consider in what ways the mandatory field requirement is imposed:

If the field is defined as required in the schema

  • You have to provide a value for the field in the CSV (or, you have to make the field no longer required in the schema. Standard fields on standard objects that are required (e.g. Opportunity.CloseDate) will always be required

If the field is required due to Validation Rules

  • You either must provide a value in the CSV or ...
  • You must change to validation rule to be more lenient; this could be perhaps, by allowing null data coming from a specific user or profile to be permitted

If the field is required due to a trigger's addError() method

  • same answer as for validation rules

All that said, required field metadata and validation rules are probably there for a reason - to make the database have integrity. If a field that should be required is null, then why should a null value be allowed in the database?

2
  • 'f a field that should be required is null, then why should it be allowed in the database.' May 19, 2021 at 12:34
  • is this a question? or just an "editorial remark"?
    – cropredy
    May 19, 2021 at 16:35

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.