'change entity form header on field change in dynamics 365

I have an Entity called Assignment. The same entity is used for saving Sub-Assignments as well. Then only difference is that for Assignment Type, the choice field value will be 'Assignment' and for the Other it will be 'Sub-Assignment'. Now the form name(Header) is Assignment for both Assignment and Sub-Assignment. Is there any way to show the form name or tab-name as Assignment and Sub-Assignment based on the choice selected?

enter image description here



Solution 1:[1]

You cannot change the "form" name, but you can change the tab name:

formContext.ui.tabs.get(0).setLabel("Sub-Assignment");

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Henk van Boeijen