Manager_Not_Defined DML exception when creating auto approval process using apex code
hi,
I am using apex code to submit approval process as soon as it validates all the fields in the object are filled. It is working perfectly with some records and throwing below exception for some other records.
System.DmlException: Process failed. First exception on row 0; first error: MANAGER_NOT_DEFINED, Manager undefined.: []
even though manager is defined in the record it was failing.Any idea !
I would assume this is referring to the manager on the user record, not any custom field on the object called manager. Can you confirm this is the case?
I would assume this is referring to the manager on the user record, not any custom field on the object called manager. Can you confirm this is the case?
Check out the solution in this thread...
http://community.salesforce.com/t5/Apex-Code-Development/MANAGER-NOT-DEFINED-Error-when-submitting-records-for-approval/m-p/169423