답변 7개
I've updated the code, but still getting the following errorDelete failed. First exception on row 0 with id 00on0000000bjq7AAA; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, FulfillmentTrigger: execution of AfterUpdate caused by: System.NullPointerException: Attempt to de-reference a null object Trigger.FulfillmentTrigger: line 8, column 1: []trigger FulfillmentTrigger on OpportunityLineItem (after insert, after update, after delete) { for(OpportunityLineItem oppLI: Trigger.new){ boolean B1 = true; boolean B2 = true; Opportunity opp = oppLI.Opportunity; List< OpportunityLineItem > oppLIo = [SELECT id, Fulfillment_Instructions_Status__c from OpportunityLineItem where Opportunity.Id = :opp.Id]; for(OpportunityLineItem oli: oppLIo){ //if//(CONTAINS(TEXT(oli.Fulfillment_Instructions_Status__c), 'QFF Submitted')*/){ String test = oli.Fulfillment_Instructions_Status__c; if(test.contains('QFF Submitted')){ }else{ B1 = false; } if(test.contains('Case Created')){ //if(String.CONTAINS(oli.Fulfillment_Instructions_Status__c, 'Case Created')){ //if(1==1){ } else{ B2 = false; } if(B1){ opp.Fulfillment_Instructions_Complete__c = true; } if(B2){ opp.Fulfillment_Cases_Created__c = true; } } } }