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
Rashika SinghRashika Singh 

Anyone have a Code to create approval process through apex class Using MetaData Api..???I need Reference Code to create New Approval Process using metadata api......!!

i don't know, how to write code for metadata api approval process..thats why i need  Reference Code
AbhishekAbhishek (Salesforce Developers) 
Hi Rashika,

Try the code as mentioned in the below blog,

http://www.jitendrazaa.com/blog/salesforce/dynamic-approval-process-based-on-the-apex-and-trigger/

https://salesforce.stackexchange.com/questions/192879/metadata-api-support-for-approval-processes

For your reference,

https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_approvalprocess.htm

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks.
Rashika SinghRashika Singh
Thanks Abhishek,
but i need Reference  code which help me to create apex class and set the criteria of Approval Process Using MetaData Api.