Created
December 16, 2022 18:57
-
-
Save iamsonal/2568c919900cdb3f05a146dfd88a64d4 to your computer and use it in GitHub Desktop.
Apex common methods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Boolean isChanged(SObject aObj, Schema.SObjectField aField) { | |
return Trigger.isInsert || | |
aObj.get(String.valueOf(aField)) != Trigger.oldMap.get(aObj.Id).get(String.valueOf(aField)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment