I can open the Quick Create: Appointment not problem and I can pre-populate some fields with no problem. I am have trouble populating the regardingobjectid field. I have step thru the JavaScript and I can see the information needed to populate that field but it keeps displaying "No Name" in the lookup field.
This is a simplified version of the JavaScript
function appointmentQC() {
debugger;
try {
var entityFormOptions = {};
entityFormOptions["entityName"] = "appointment";
entityFormOptions["useQuickCreateForm"] = true;
// Open the form.
Xrm.Navigation.openForm(entityFormOptions, formParameters).then(
function (success) {
//alert(success);
},
function (error) {
//alert(error);
});
I think you ca build the whole regarding object value upfront and send it in the form parameters like follows.
recId = <record id to be set in regarding>;
recEntityName = <schema name of the entity for above recId>;
recName = <Name of the entity for above recId>;
var regardingValue = new Array();
regardingValue[0] = new Object();
regardingValue[0].id = recId;
regardingValue[0].name = recName;
regardingValue[0].entityType = recEntityName;
var formParameters = {};
formParameters["regardingobjectid"] = regardingValue;
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.