You need to sign in to do that
Don't have an account?
Jim Montgomery
attempt to de-reference a null object error adding fields together
trigger OutsourceOrderTotal on Apttus_Proposal__Proposal__c (after update) {
for(apttus_proposal__proposal__c p : trigger.new)
if(p.os_offshore_1040_1041_dollars__c == null
&& p.os_offshore_business_dollars__c == null
&& p.os_offshore_charter_dollars__c == null
&& p.os_onshore_1040_1041_dollars__c == null
&& p.os_onshore_business_dollars__c == null
&&p.os_onshore_charter_dollars__c == null)
{
p.os_order_total_trigger__c = 0;
}
else
{
p.os_order_total_trigger__c = p.os_offshore_1040_1041_dollars__c + p.os_offshore_business_dollars__c + p.os_offshore_charter_dollars__c
+ p.os_onshore_1040_1041_dollars__c + p.os_onshore_business_dollars__c + p.os_onshore_charter_dollars__c;
}
}
for(apttus_proposal__proposal__c p : trigger.new)
if(p.os_offshore_1040_1041_dollars__c == null
&& p.os_offshore_business_dollars__c == null
&& p.os_offshore_charter_dollars__c == null
&& p.os_onshore_1040_1041_dollars__c == null
&& p.os_onshore_business_dollars__c == null
&&p.os_onshore_charter_dollars__c == null)
{
p.os_order_total_trigger__c = 0;
}
else
{
p.os_order_total_trigger__c = p.os_offshore_1040_1041_dollars__c + p.os_offshore_business_dollars__c + p.os_offshore_charter_dollars__c
+ p.os_onshore_1040_1041_dollars__c + p.os_onshore_business_dollars__c + p.os_onshore_charter_dollars__c;
}
}
All Answers
Let me inform if it helps you and kindly mark it best answer if it helps you so it make proper solution for others
thanks
sfdcmonkey.com
Thanks!!!