Scenario -
On the contact form there is a subgrid to add new courses (for example)
when I click on the 'New course button' on the subgrid, the default course form is launched.
The form is pulling up Contact information and updating the relevant fields on it.
But there is function on the load of the form which should clear some of the information being pulled. (mentor and verifier fields should get cleared - these are lookup fields to contact)
This works fine in the Legacy web client but not in UCI as the fields doesn't get cleared up on the load.
Unified Client Interface Legacy Web Client

The code I have used on the load is
var formType = Xrm.Page.ui.getFormType();
if (formType == 1) //create mode
{
if (Xrm.Page.getAttribute("gap_mentor").getValue() != null) {
Xrm.Page.getAttribute("gap_mentor").setValue(null);
}
if (Xrm.Page.getAttribute("gap_verifier").getValue() != null) {
Xrm.Page.getAttribute("gap_verifier").setValue(null);
}
}