function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jay CorriveauJay Corriveau 

​Developer script exception from

We keep getting this error:

Developer script exception from Company Name : createNewSOCOnNewRequest : createNewSOCOnNewRequest: execution of AfterInsert caused by: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Contact__c]: [Contact__c] Trigger.createNewSOCOnNewRequest: line 22, column 1

Apex script unhandled trigger exception by user/organization: ORGNUMBER

createNewSOCOnNewRequest: execution of AfterInsert

caused by: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Contact__c]: [Contact__c]

Trigger.createNewSOCOnNewRequest: line 22, column 1

We aren't developers, and we haven't had any devs in there for a few weeks.  The error just started popping up a few days ago

We opened a support case with salesforce, but they sent us here saying that we'd get pro support here.

Any ideas?

Thanks!
jp1234jp1234
There might be other issues as well, but you are getting that error because the user forgot to fill in Contact__c field when creating the new record that is handled by createNewSOCOnNewRequest trigger.
pconpcon
Did someone update the object and make the Contact__c field on that object require now?  If so then your code will have to be updated to make sure that Contact__c is set everywhere this is inserted.  Or you can make that field no longer required.