Pop up a doctype view inside another doctype

Hello everyone, i’m new here and using frappe, too. I’m trying to make a “pop up” of a doctype. I have a doctype named Contact and inside of this, i want to make a hidden button that when a new contact is saved the button appear. Then, you can click the button and “pop up” a Telephone doctype form to register a new telephone for that contact.

In ERPNext that functionality is here https://demo.frappecloud.com/desk#List/Contact

When you make a new contact, the 2. communication history is empty. but when you save the new contact a button appear and let you open a email form.

The question is:
How i can make that functionality to solve my problem?
Where i can find the code in ERPNext for that?

Thank you.

note: sorry if my english it’s not perfect.

Hi, welcome to the community!

DocTypes are not designed for popups out of the box. Communication is coded in JS.

As a rule, Its best to stick to the standard UI patterns in Frappe, than to build something custom that is hard to maintain.

Thank you for your help!! i think i found the code.