Opportunity opp = new Opportunity();
opp.Account = acc;
opp.OPP_closing_note__c = 'test';
opp.Unit_Price__c = 10;
opp.Type = 'Project';
insert opp;
System.debug('---->oppp--- '+opp);
opportunity newOpp = [Select Id from opportunity where id = :opp.id];
[SalesForce] System.DmlException: Process failed. First exception on row 0; first error: MANAGER_NOT_DEFINED, Manager undefined.: []
Related Topic
- [SalesForce] Test class error System.DmlException: Insert failed. First exception on row 0; first error
- [SalesForce] System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY
- [SalesForce] getting an error System.DmlException: Update failed. First exception on row 0 with id 00N000000FqP2cIAF; first error:
Best Answer
Manager means the Manager(User) of record owner.
So in test class, First you have to assign manager to the user you have created.