How to return to parent doctype after saving doctype using frappe.new_doc?

Hi!

I have a custom page “myCustomPage” with button which triggers frappe.new_doc() function, and when i click this button it redirects me to new_doc, and its fine, but what I want to achive is that, when i save new doc type i want to be automatically redirect back to “myCustomPage”.

Currently it works with link field type, how to achive that manually?