I have used openEntityForm before, to great effect! Now I need to have a ribbon button that opens a phone call.
I am struggling to workout what code to use to pass in the "to" and "regarding" fields.
I have tried variations around ....
var param = {};
param["regardingobjectid"] = ---an ID----
param["regardingobjectidname"] = ---- a name ----
param["regardingobjecttype"] = "opportunity";
Xrm.Utility.openEntityForm("phonecall",null, param);
I have tried similar code but just passed a simple field (phone number) and that works. So I seem to have something wrong on lookup fields.
Can someone please give correct code to set the "to", "from" and "regarding" fields? In my case I need to set the "to" to the contact from an opportunity and the regarding to be an opportunity.