are this buttons now integrated or or selectable?
I cant find any documentation about it. and it could save a lot of time for a Production line as there are many workers.
I am very grateful for all the help I get
It is not developed and it was closed due to inactivity. You can achieve this by writing this client script.
frappe.ui.form.on('Doctype', {
after_save(frm) {
frappe.set_route("List","Doctype")
}
})
Dear ejaaz
Manny thanks vor your verry quick replay.
As far as I understood your script:
Event Handler Definition:
frappe.ui.form.on(‘Doctype’, {…}) registers an event handler for the form of a specific doctype. The doctype name is ‘Doctype’.
After_save:
Inside the event handler there is a function that responds to the after_save event. This means that the function is executed after the form is successfully saved.
Set Route:
frappe.set_route(“List”, “Doctype”) sets the route to return to the list view of the same doctype after saving. This means that the user is automatically redirected to the list view of the doctype after saving.
So if I looking for a funktion like:
In my form new polish record
frappe.ui.form.on(‘New Polish Records’, {…})
PS: i see it musst be a doctype changing to:
frappe.ui.form.on(‘Polish Records’, {…})
PSPS:
I need it on a doctype record… how to change it on a doctype repoert? i try to figure it out ^^
after save form:
after_save(frm) {
it sould open a new form of “New Polsihing Records”
PS:
nee also to be a doctype i think:
frappe.set_route(“New”,“Polishing Records”)
}
})
Would that be correct then?
frappe.ui.form.on(‘Polishing Records’, {
after_save(frm) {
frappe.set_route(“New or add?”,“Polishing Records”)
}
})
PSPSPS:
new or add seems not work :-/
Manny for your Help in advance ! ^^
cheers
Try this if you want to redirect to the list view after saving.
// Assuming 'Polishing Records' is your doctype name
frappe.ui.form.on('Polishing Records', {
after_save(frm) {
frappe.set_route("List","Polishing Records")
}
})
I want to create a new record directly… “new Polishing record”
could it work like this?
frappe.ui.form.on(‘Polishing Records’, {
after_save(frm) {
frappe.set_route(“New Polishing Records”)
}
})
could it work like this?
Use it.
frappe.ui.form.on('Polishing Records', {
after_save(frm) {
frappe.new_doc('Polishing Records');
}
});