I have the code below, that I have realised doesn't work for custom entities. I realise that I can set the "parentcustomerid" and the "parentcustomeridname", however I just can't get the "Type" to work (parentcustomeridtype). My own custom entity is called new_assets, and I get the following error:
Surely there has to be a way to get this to work?
function OpenNewContact() {var parameters = {};//Set the Parent Customer field value to “Contoso”. parameters["parentcustomerid"] = "9878322C-94D6-E177-9B2A-00155D9D700B"; parameters["parentcustomeridname"] = "Ben"; parameters["parentcustomeridtype"] = "new_assets";//Set the Address Type to “Primary”. parameters["address1_addresstypecode"] = "3";// Open the window. Xrm.Utility.openEntityForm("contact", null, parameters); }