You need to sign in to do that
Don't have an account?
JohnDurai
Trigger to update Date Field
Hi - i want to create handler method for trigger to update the date field for the below scenario.
A BEFORE Trigger (INSERT / UPDATE) on Custom object to update Status_Changed_Date__c and Investigation_Completed_Date__c fields when the Resolution_Status__c field is updated.
For example, when Resolution_Status__c moved from "New" to "Resolved","In Progress" then I want to update Status_Changed_Date__c to today.
A BEFORE Trigger (INSERT / UPDATE) on Custom object to update Status_Changed_Date__c and Investigation_Completed_Date__c fields when the Resolution_Status__c field is updated.
For example, when Resolution_Status__c moved from "New" to "Resolved","In Progress" then I want to update Status_Changed_Date__c to today.
apex trigger: Apex Class:
If this helps, Please mark it as best answer.
Thanks!!
All Answers
As per my understanding,
when Resolution_Status__c field status is moved to Inprogress, you need capture the date in Status_Changed_Date__c.
when Resolution_Status__c field status is moved to Resolved, you need capture the date in Investigation_Completed_Date__c.
Am i correct??
Thanks!!
If my understaning is correct then try with below code.
change the object API name as per your org.
If this helps, please mark it as best answer.
thanks!!
apex trigger: Apex Class:
If this helps, Please mark it as best answer.
Thanks!!