You need to sign in to do that
Don't have an account?
Ankita Gupta 65
Error in assignment# Apply Domain layer Principles in apex
Working on assignment where I'm getting the below error in fflib_SObjectDomain class.
Apex trigger AccountsTrigger caused an unexpected exception, contact your administrator: AccountsTrigger: execution of BeforeInsert caused by: System.NullPointerException: Attempt to de-reference a null object: Class.fflib_SObjectDomain.triggerHandler: line 346, column 1
This line is
Type constructableClass = domainClassName.endsWith('Constructor') ? Type.forName(domainClassName) : Type.forName(null,domainClassName+'.Constructor');
Apex trigger AccountsTrigger caused an unexpected exception, contact your administrator: AccountsTrigger: execution of BeforeInsert caused by: System.NullPointerException: Attempt to de-reference a null object: Class.fflib_SObjectDomain.triggerHandler: line 346, column 1
This line is
Type constructableClass = domainClassName.endsWith('Constructor') ? Type.forName(domainClassName) : Type.forName(null,domainClassName+'.Constructor');
"domainClassName" is not holding any value.
Use debug statements and confirm that you are assigning something to it.