IsChanged function in Apex - Ideas - Salesforce Trailblazer Community

All Ideas

Idea Details

Post an Idea
2,160  Points
Under Point Threshold
Idea hasn't met the 2,500-point review threshold. Give it an upvote or downvote.

IsChanged function in Apex

Developer Tools

You all have probably come across the function ISCHANGED available in formulas. Many a times we come across situations in an Apex trigger where we need to compare the value of a field on a record before update and after update. Today, the only way to do this is to fetch the old instance of the record from the map Trigger.OldMap and compare it with the record from the map Trigger.NewMap. It would be really helpful if there was a function IsChanged in apex which would return a boolean value on passing the field on the record as parameter.This way, salesforce can optimize the code that is being written by various developers to achive the same result. This would also help the developers a lot. Do vote on this idea if you support this idea so that we can see this in the latest release in future.

Merge Idea · Flag

  • Upvotes
  • Downvotes

Ideas

Apps

from AppExchange

Questions

Help us to keep IdeaExchange clean by pointing out overlapping ideas. We'll investigate your suggestion and merge the ideas if it makes sense.



 

 

Thanks for your merge suggestion. We will review it shortly and merge the ideas if applicable.

Salesforce takes abuse situations very seriously. Examples of abuse include but are not limited to posting of offensive language or fraudulent statements. To help us process your request as quickly as possible, please fill out the form below describing the situation. For privacy and security reasons, the final outcome of an abuse case may not be revealed to the person who reported it.


 

Thank you for your feedback. We take abuse seriously and will investigate this issue and take appropriate action.