Basically i have created one Web Form based on one doctype. Now I am able to create document using web form but my query is can i directly open that document when i click save on web form. Using Success link we can go to static page but I want to directly go that page of new document created.
It is possible as I have done a similar thing. This is how I did it using the .js file of the WebForm:
Use frappe.web_form.after_save trigger to run the redirection code
Call a server-side method to fetch the document name that was submitted
Use that document name to redirect the user to that document web page URL, I used window.location.href for this. window.location.href is basically how I “throw” the user to the document web page after the WebForm is saved