How to open a new tab (passing data)

Hii
How to make a link for payment entry and when loading the form Payment Entry I need to set the data based on the value of the invoice(Column “Invoice No”) clicked.

I try
frappe.set_route (“Form”, doclist [0] .doctype, doclist [0] .name);
But load the data on the same page.

window.open (‘# Form / DocTypeName / New DoctypeName 1’, ‘_blank’)
Open a new tab but I can not set the data.

Can someone help me please?

1 Like

If these are the changes in the core ERPNext application, will be best if you can get support on the same via pull request. The code will also help one to get the context and give support around it.

1 Like

How do you mean you cannot set data? I am trying to achieve a similar thing (create a payment entry based on a camt.053 preview with options, then open in a new tab, edit and submit). I can save modifications or submit the record… In case there is something failing in a validation step, that prevents saving.

I use a PY code to create the new record, and then use its reference (PE-#####) to open it in the new tab. This is where I see a difference to your code…

Hi

var new_doc = window.open(‘#Form/Stock Entry/New Stock Entry 1’, ‘_blank’);

By above line its opening new stock entry doc on new tab but not able save no erp trigger working on that. Please help

Try giving full urls in the window.open() method.
For ex:
window.open("https://yourapp.com/app/doctype/new-doctype-1")

It worked fine for me. I was able to edit the new doc.