You need to sign in to do that
Don't have an account?

systen.DmlException:Insertfailed
Hi Guys,
I am trying to insert a record into CustomObject SalesOrderLine__c . getting error
System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, SalesOrderLineBeforeUpdateInsert: execution of BeforeInsert caused by: System.NullPointerException: Attempt to de-reference.
public pageReference save() { SalesOrderLine__c sol = new SalesOrderLine__c(); sol.SalesOrder__c = salesorder1.Name; sol.Product__c = 'a0X40000000ZwTU' ; sol.OrderQuantity__c = 3; insert sol; return null; }
Appreciate your help,
Thank You
this code has no issue,
Check out is there any trigger is firing after insert , after update for CustomObject SalesOrderLine__c
probably this trigger is throwing exception
hope this will help you
Thanks,
Bala
All Answers
this code has no issue,
Check out is there any trigger is firing after insert , after update for CustomObject SalesOrderLine__c
probably this trigger is throwing exception
hope this will help you
Thanks,
Bala
Hey Bala,
Thanx for your reply.. I downloaded app from appechange. so i cant see that trigger code.
Anyways thanx 4 ur help...:))