0

I have a Clone With Product Button in classic using url hacking. it clones the order with all the products and opening the order editing page. the order and products will be saved when click save or return to origin order without saving anything on cancel.

I am trying to recreate exact same behavior in lightning. how should I do it? currently I am trying to create a visualforce page button. the controller is an extension of standard order controller, I have to create the order and lines and insert them into the database and then redirect to the editing page of the new order. I want to override the cancel button so when click cancel it will rollback the database to my savedpoint(delete the order). but it looks like the button override is not working in lightning.

so what is the lightning solution for this button?

2

Here you can find a solution for this problem.

https://github.com/sfcure/CloneOpp

-2
You can write custom apex logic as per your requirement.
In javascript code call apex method you can achieve what you want.
**sforce.apex.execute **
please check below link.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_and_ajax.htm

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