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
yogesh goadyogesh goad 

Approving a record before insert

Is it possible any how to make a custom object record undergo approval process before inserting it to object.
Best Answer chosen by yogesh goad
Himanshu ParasharHimanshu Parashar
Hi Yogesh,

No it is no possible reason being if you will try to call approval process it asks for the object record it, once you pass the record it then you can call the approval process.


Thanks,
Himanshu

All Answers

Himanshu ParasharHimanshu Parashar
Hi Yogesh,

No it is no possible reason being if you will try to call approval process it asks for the object record it, once you pass the record it then you can call the approval process.


Thanks,
Himanshu
This was selected as the best answer
yogesh goadyogesh goad
Is it not possible to execute a approval process using insert trigger.
Himanshu ParasharHimanshu Parashar
you can't get record id in before insert trigger, it is available only in after insert trigger and if you will put exception in after insert trigger transection will roll back.

Thanks,
Himanshu
yogesh goadyogesh goad
Thanks Himanshu.
I understand what u explained.
I have found a solution to my requirement. I will try and implement it.

 
Himanshu ParasharHimanshu Parashar
Great thanks.
yogesh goadyogesh goad
Hi Himanshu,
Can u please drop in ur mail to connect with u on linked.
 
yogesh goadyogesh goad
Thanks a lot.