I have been using the technique in the following post:
Xrm.Navigation.openForm not honouring formid
which has beeen working great in the Classic Interface.
I have updated my JavaScript to the following:
function OpenSpecificForm(primaryControl)
{
const FORMID = "A696976B-EA8A-42F3-B4DC-F35DC9204D58";
var formContext = primaryControl;
var parameters = { formid: FORMID };
var entityFormOptions = {};
entityFormOptions["entityName"] = "new_entity_name";
var recordId = formContext.data.entity.getId();
var recordName = formContext.getAttribute("new_name").getValue();
if (recordId != null) { parameters["new_targetentityfieldid"] = recordId; }
if (recordName != null) { parameters["new_targetentityfieldname"] = recordName; }
Xrm.Navigation.openForm(entityFormOptions, parameters);
}
and set ribbon workbench as follows:
This code continues to work as expected in the Classic UI but doesnt seem to work in the new Unified Interface. The entity form opens but opens the last one CRM remembers and NOT the one I have specified in the formId.
Has anyone managed to open a specific form in the new UI?