Skip to content
Discussion options

You must be logged in to vote

Now with studio.call (#141) you can write a success script like this calling frappe.client.submit

function onSuccess(data) {
  studio.call("frappe.client.submit", {doc: data}).then(() => {
    customer.value = ""
  	billingItems.value = []
  	studio.showToast({ message: "Invoice generated successfully!", type: "success" })
  })
}

Output for submit invoice script on checkout button:

submit-invoice.mp4

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ruchamahabal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants