You need to sign in to do that
Don't have an account?
when date field is made null --update the same field with the previous date value if populated
Hello Gurus,
I have a standard object
Scenario:i need to update a contract date__c custom field on the same object only if the date value is made NULL by external integration with the previous date value from the same field if populated,and if previous DATE value is NULL do nothing
i know a trigger.old and getmap (id) could be used but i need the exact "after update" trigger syntax,
i used this but i get an after update stack error,
please note i need an after update trigger
trigger abc_123 on Asset (after update) {
for (Asset asse : Trigger.new) {
Asset oldAsset = Trigger.oldMap.get(asse.ID);
if ( asse.contract_Date__c==null) {
asse..contract__c = oldAsset..contract_Date__c;
}
}
i know this is simple but my brain cells are out on a friday evening,any input appreciated. thank you!
This should be before update.