I deployed a trigger and trying to update all records to populate custom field of existing records with value ( account object ). Everything works perfect unless I get the following error:
System.DmlException: Update failed. First exception on row 2017 with id *; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Domain__c]: [Domain__c]
Explanation is simple, Domain__c
field is required at every account. But this account ( which triggered error ) doesn't have this field populated... so:
- How is that possible to have this account in salesforce?
- Obviously all updates/changes of this account ( e.g. using integrated 3rd party software ) will trigger error ( all update trigger )... How to fix it?
- What condition to add ( in apex code ) to skip these records in mass update?