Using “openEntityForm” a CRM form can be opened. While it is opening, different form fields values can be populated and those values can be passed to the form.
Xrm.Utility.openEntityForm(name,id,parameters,windowOptions)
name: Entity Logical Name
id: Record id
parameters: Form id, Field Ids, and Values, Custom query string parameters
windowOptions: Flag to open as a New Window
name: Entity Logical Name
id: Record id
parameters: Form id, Field Ids, and Values, Custom query string parameters
windowOptions: Flag to open as a New Window
Passing Parameters and Populate Field Values in a New Contact Form
function openNewContact() {
var caseId = Xrm.Page.data.entity.getId();
var title = Xrm.Page.getAttribute(“title”).getValue();var windowOptions = {
openInNewWindow: true
};
var parameters = {};
parameters[“new_caseid”] = caseId;
parameters[“new_caseidname”] = title;
Xrm.Utility.openEntityForm(“contact”, null, parameters, windowOptions);
}
Continue reading “Xrm.Utility : openEntityForm with Parameters”