0

I have a quick question on approval process and I would like to get your suggestion on how to implement this particular requirement.

We are developing a custom lighting web component for our application and we have a requirement to trigger the standard approval process on the click of custom link from that component. The expectation is that - it should follow the exact flow as it would, if I click on the Standard "Submit For Approval" link from the custom actions present on the object.

I found some article on how to trigger the approval process from the apex code, but not finding any resources on how to do it from the client side JavaScript.

Could you please suggest if any of you have solved this particular requirement on your project?

Thanks, Bikram.

0

Your best bet is to create an apex method that's invocable from LWC that will start the approval process, then you can call that method to kick-off the approval.

3
  • During the standard approval process it usually shows a popup for the user to enter the comments. I don't think that will be possible if we trigger if we do it from Apex. So I was wondering if there is a possibility I can just trigger the standard process without writing any custom code. Nov 27 '19 at 18:44
  • The popup will still show up when changing the status of the approval, what do you want the approval to do?
    – vm53
    Nov 27 '19 at 19:45
  • We are developing the component as a partner product. So we just have to trigger the approval process from our lwc component. Nov 27 '19 at 20:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.