My Trigger Scenario's
Scenario 1 : Prevent Contact Update by Same User Within 1 Hour ? Trigger TimeLastmodified on Contact (Before update) { Set<Id> contactIds = new Set<Id>(); for (Contact con : Trigger.new) { contactIds.add(con.Id); } for (Contact newCon : Trigger.new) { if (newCon.LastModifiedById == UserInfo.getUserId()) { Long minutesSinceLastUpdate = DateTime.now().getTime() - newCon.LastModifiedDate.getTime(); minutesSinceLastUpdate = minutesSinceLastUpdate / (60 * 1000); ...
Comments
Post a Comment