Hello,
I have been trying to set a text field with a value for an existing record using Xrm.Utility.openEntityForm and Xrm.Navigation.openForm but the field is still not getting set.
This is my code, I am applying it to a system view and it works fine when I try to create a new record but it does not update any existing records as the parameters are not passed as the cmdbar is still visible.
I passed the selectedControlSelectedItemReferences CRM parameter from the ribbon workbench and I am using the recordID to navigate to the record I am trying to update.
Here is my code.
function setTextField(selectedItem){
parameters["mci_casereopeningreason"] = "ANY RANDOM DATA";
parameters["cmdbar"] = false;
Xrm.Utility.openEntityForm("incident", selectedItem[0].Id, parameters);
}
Thanks in advance.