• Support Nova
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Hello,

4 years ago, I have created a Trigger "BeforeUpdate" for the opportunities.

When a specific changes is made, we request all the Opportunity Line Item associated and put them into a Map  : 
Map<Opportunity,List<OpportunityLineItem>> mapOppsOlisToSendJira = new Map<Opportunity,List<OpportunityLineItem>>();

This map is the Input parameter of another method "setAndSendJiraOpportunityDescription".

Until 3 months ago, the trigger and apex class were all right : 
in the trigger, I put key and values into the map.

And after that, the method "setAndSendJiraOpportunityDescription" browse the keySet() and for each Opportunity, get the associated Opp Line Items.

But since 3 months, we have sometimes an errors where for my Opportunity, I lost the associated values.

In the trigger, I put the values, I have a debug log to check taht. And it's all right.

But in the method "setAndSendJiraOpportunityDescription", when I check again, I have "null" as values.

In the complete log, we can see the variable assignment : we still have the Opp Line Item.

And in the first line of this method, in the debug log, we lost them.

 

Do you have any idea what is wrong ? 

The TriggerThe methodLogs of the trigger - values are filledBeginning of the method - Assignment OKLogs of the map just after assignement - values are lost

Hello,

4 years ago, I have created a Trigger "BeforeUpdate" for the opportunities.

When a specific changes is made, we request all the Opportunity Line Item associated and put them into a Map  : 
Map<Opportunity,List<OpportunityLineItem>> mapOppsOlisToSendJira = new Map<Opportunity,List<OpportunityLineItem>>();

This map is the Input parameter of another method "setAndSendJiraOpportunityDescription".

Until 3 months ago, the trigger and apex class were all right : 
in the trigger, I put key and values into the map.

And after that, the method "setAndSendJiraOpportunityDescription" browse the keySet() and for each Opportunity, get the associated Opp Line Items.

But since 3 months, we have sometimes an errors where for my Opportunity, I lost the associated values.

In the trigger, I put the values, I have a debug log to check taht. And it's all right.

But in the method "setAndSendJiraOpportunityDescription", when I check again, I have "null" as values.

In the complete log, we can see the variable assignment : we still have the Opp Line Item.

And in the first line of this method, in the debug log, we lost them.

 

Do you have any idea what is wrong ? 

The TriggerThe methodLogs of the trigger - values are filledBeginning of the method - Assignment OKLogs of the map just after assignement - values are lost