You need to sign in to do that
Don't have an account?

Update Custom Object
Hi...
I have a custom object that I would like to change the value of field PREVIOUS_FIRE this my object, when the PreviousFireTime of CronTrigger value be changed.
How do I update the field from my custom object based on field CronTrigger?
Thank you
If yes, you can create a trigger on CronTrigger object at insert,update such that when the vaue of PreviousFireTime is changed, you can fetch the value of PREVIOUS_FIRE and change it.
reference: http://www.jonathanbroquist.com/using-trigger-old-trigger-new-to-detect-when-field-values-change/
There I built it.
How do I get updates LAST EXECUTION within CronTrigger of Salesforce to update the field of my custom object?
Thank you
Since you are looking to capture the last execution(or I can say the last creation or updation on the CronTrigger object), you can create a trigger as follows:
trigger UpdateField on CronTrigger(after insert, after update, after delete, after undelete) {
//WRITE CODE TO FETCH(USING SOQL) AND INSERT/UPDATE THE FIELD(say X) ROM ANOTHER OBJECT
insert X;
}
sample code thru which you can get some ideas how to code:
http://developer.force.com/cookbook/recipe/mass-updating-contacts-when-an-account-changes
It's TRUE?