Open an existing entity record within a dialog box in model driven app power Apps

The below code can be used to Open an existing entity record within a dialog box in model driven app power Apps. hope it helps.