Firstly we need to find out the ID of the Dialog. This could be attained in 2 ways.
1. Search with Dialog name in Customizations.xml
For eg: If you search with your dialog name, you could find something similar to this.
2. Open the Dialog and press F11 to get the URL. In the URL we could find out the ID of the Dialog.
Javascript Code snippet:
var dialogId = "a13ad982-d812-40a0-ab67-f314cdabbd2b"; // This must be your Dialog ID//Optional:To save and close entity form as soon as the dialog is closed.
Sample Scenario :
To open a Dialog when the user clicks on Ribbon button of the entity form.