Hi,
I am attempting to use Xrm.Utility.openEntityForm to open a case form from within a java script. The form contains an SLA field which I want to populate with default value when opening the form. I have found the example below which shows how to pass id, name and type parameters for lookup fields.
function OpenNewContact() {
var parameters = {};
//Set the Parent Customer field value to “Contoso”.
parameters["parentcustomerid"] = "2878282E-94D6-E111-9B1D-00155D9D700B";
parameters["parentcustomeridname"] = "Contoso";
parameters["parentcustomeridtype"] = "account";
//Set the Address Type to “Primary”.
parameters["address1_addresstypecode"] = "3";
//Set text in the Description field.
parameters["description"] = "Default values for this record were set programmatically.";
//Set Do not allow E-mails to "Do Not Allow".
parameters["donotemail"] = "1";
// Open the window.
Xrm.Utility.openEntityForm("contact", null, parameters);
}
From <https://msdn.microsoft.com/en-gb/library/gg334375.aspx>
From this I guess that I need to code something like the following:
parameters["slaid"] = <whatever the id is>
parameters["slaname"] = "Bronze"; //This is the name of the SLA I have created
parameters["slatype"] = "sla"; //I'm not sure if I actually need this
My question is - what is the id which I need to pass and where do I get it from?
Thanks for your help,
Roy
*This post is locked for comments