hi , am new in frappe framework but i have some tasks like :
submit form
creating issue automatically when i submit a form
But i dont have a good idea of where should’i write the server script for my form inside my support client page
hi , am new in frappe framework but i have some tasks like :
submit form
creating issue automatically when i submit a form
But i dont have a good idea of where should’i write the server script for my form inside my support client page
Hi,
To create an issue in ERPNext on submit of Client Support Page from Web, you can use the following API call:
frappe.call({
method: "erpnext.support.doctype.issue.issue.create_support_issue",
args: {
subject: "Issue Subject",
description: "Issue Description",
priority: "High",
status: "Open",
customer_name: "Customer Name",
contact_email: "Contact Email",
contact_mobile: "Contact Mobile"
},
callback: function(r) {
console.log(r);
}
});
Copy
You can replace the values of the arguments with the actual values you want to use. You can also add more arguments if needed.
This API call will create an issue in ERPNext with the given details. You can find the created issue in the Issue list by going to Home > Support > Issues > Issue 1.
thank’s , I’ll try it !!
hi have some bad issue about the path from server methods calls inside the the frappe.call( ** method: “erpnext.support.doctype.issue.issue.create_support_issue”***)
it not done
hi @mangroliya , it fix like :
firstly the method calls create_support_issue is define in issue.py under the @frappe.whitelist method and the request ajax , send data ( parameters ) to they back for the create_support_issue and him create automatically the issue and pass the data parameters to the issue config parameters ( soo good !! )
Thank’s for the track !!