I was wondering how to link from one Doctype ( via an “onClick” on a button field called “My Link Button”) to another Doctype in different module? Say to Selling/Customer/Form?
Also is there an easy way to add a basic javascript script to go back one page on a button field??
Something like:
function goBack() {
window.history.back();
}
Any help in getting this code to work would be really appreciated.
Thanks.
Thanks for the reply @rmehta.
Where would I add frappe.set_route(“Form”, “Customer”, “CustomerName”) ?
In the Doctype .js file the .py file or somewhere like the “depends on” field of the button ?
An example of how it should be included would be really appreiciated.
Thanks
@rmehta The back button of the browser doesn’t work if you navigate to a doctype using the set_route method. The back button creates a new entry. Any solution?
Has this syntax changed in later versions? Somehow, I am unable to implement this for my usecase, which is similar. i.e. Want to introduce a button as custom field in Patient Encounter Doctype, which on clicking should open another doctype (custom) called assessment question.
Any help? Thanks in advance