I'm trying to update parent record when current record is 'finally approved'. I've master-detail relationship between parent child
was trying to achieve this in following ways :
1) Firing Cross object field update when record is finally approved- Found this is not possible
2) Writing trigger on child, which query processIntance object ProcessInstance somethng like this :
Select ID, Status, TargetObject.Name From ProcessInstance Where TargetObjectID = '' AND Status in ('Approved', 'Rejected')
TargetObjectID -> current record ID
But seems like status of record is still not approved , when trigger is firing.so query is not returning anything
3) Thinking to writer a scheduler which will fire same code i'm writing in trigger. I'm going to implement this which I think, will work But just thinking If community has any other efficient way to achieve same
Thanks !