• DASA YERRISWAMY
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
I'm working with Triggers and I believe there is an unreported bug that I have found regarding Trigger.New and Trigger.Old. Here is the bug:

1. It's a Trigger on Opportunity after update. I even tested this with before update.
2. We are using Salesforce API (wsdl) to update the Opportunity from an external application.
3. When the Trigger fires, the objects Trigger.New and Trigger.Old (any field), holds the same exact values.

I expected that Trigger.New would hold the new values (the ones that will be updated in the database after the order of execution completes), while the Trigger.Old would hold the current/previous values. I made sure there are no workflows and other processes interfering with this particular field. I know I know, there are tons of resources showing how to compare the old and new values and I've tested them all to no avail.

The important thing to note: When a user updates the Opportunity in Salesforce, the Trigger works perfectly fine. The Trigger.New reflects the new values that will be updated, and the Trigger.Old reflects the old values. BUT when we are updating the Opportunity from an external application using the Salesforce API wsdl, the Trigger.Old and Trigger.New objects are exactly identical when the trigger fires. However, after the entire Order of Execution complets, the fields do indeed reflect the new values in the Salesforce interface.

Has anyone had this issue? Or can somebody test/help with any ideas/input?

Thanks a lot.