You need to sign in to do that
Don't have an account?
Forrest Muldune
Apex Trigger - Update Date field with value in other Date field on same custom object
All ,
This is my first attempt in creating a trigger.
I have 2 date fields (below) in a custom object name Judgment_Event__c
Expiration_Date__c
Recording_Date__c
When I attempted to write my trigger below, I received the error.
I want a trigger to initiate when a user enters or edits the Recording_Date__c the same date value will automatically populate into the Expiration_Date__c . This could be easily done with a formula field, however I am trying to learn how to code using triggers.
Regards,
This is my first attempt in creating a trigger.
I have 2 date fields (below) in a custom object name Judgment_Event__c
Expiration_Date__c
Recording_Date__c
When I attempted to write my trigger below, I received the error.
I want a trigger to initiate when a user enters or edits the Recording_Date__c the same date value will automatically populate into the Expiration_Date__c . This could be easily done with a formula field, however I am trying to learn how to code using triggers.
Regards,
obj.Expiration_Date__c = obj.Recording_Date__c;
reverse it.
All Answers
i.e obj.Recording_Date__c = obj.Expiration_Date__c
sharathchandra,
For some reason whey I enter a date in Recording_Date__c the date value does not populate into the
Expiration_Date__c field.
My update trigger is below
obj.Expiration_Date__c = obj.Recording_Date__c;
reverse it.
sharathchandra,
Thank you sir, I appreciate your time. if you know of any websites that could help me with the similar issues I had, I would appreciate it if you could send it to me.