Following https://msdn.microsoft.com/en-us/library/gg334375.aspx#BKMK_ExampleXrmUtilityOpentEntityForm, I've tried the code below but it does not work. As far as I can tell from debugging, it does not like these parameter names. If I comment those out openEntityForm() then works as intended.
function ChildAccount()
{
var parameters = {};
parameters["parentaccountid"] = Xrm.Page.data.entity.getId();
parameters["parentaccountidname"] = Xrm.Page.data.entity.getPrimaryAttributeValue();
parameters["parentaccountidtype"] = "account";
Xrm.Utility.openEntityForm("account", null, parameters);
}
I also tried following the example at http://inogic.com/blog/2014/04/opening-a-pre-populated-child-record-form-in-dynamics-crm/ but here the function crashes at the first parameters statement.
Did CRM not create parameters for this OOB field or is programmatically creating Child Accounts not allowed for some reason? In case this was a security role issue, I tried these buttons while logged in as a System Admin and that did not solve anything.