function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RajivRajiv 

Copy Approval history from one object to another object

Hi Everyone,

 

I want to copy approval histroy from one object to another object. Could anyone help me on this. Does anyone know how to copy 

this using apex.

 

Regards,

Rajiv

AlagarAlagar

Rajiv,

 

i think we cannot query against approval history object..u can use processinstance object instead of approval history because record displaying under approval history are from processinstance object

RajivRajiv

Thanks Alagar.

 

I am using Processinstance object all the legacy values are coming, so it's working fine but when  I do upsert an error appears : Required fields are missing: [Process Definition, Current Node]: [Process Definition, Current Node]. Do you know what this error means.Thanks in Advance.

 

Regards,

Rajiv

AlagarAlagar

you cannot update Process instance object, u can only query against it...fetch the records from process instance and put it in a seperate object..