Hi all,
I have created a custom subgrid(in a HTML web resource) in the opportunity form which has a '+' button and the action behind the button is shown in the below function:
function openLookupWindow() {
var pid = parent.Xrm.Page.data.entity.getId();
var lookupurl = "/_controls/lookup/lookupinfo.aspx?" +
"AllowFilterOff=0&DefaultType=10011&DisableQuickFind=0&DisableViewPicker=0&IsInlineMultiLookup=0" +
"&LookupStyle=single&ShowNewButton=1&ShowPropButton=1&browse=false&objecttypes=10011";
var dialogwindow = new parent.Mscrm.CrmDialog(parent.Mscrm.CrmUri.create(lookupurl), window, 500, 500);
dialogwindow.setCallbackReference(function (result) {
for (var i = 0; i < result.items.length; i++) {
var oppress = new Object();
oppress.new_OpportunityId = { Id: pid, LogicalName: "opportunity" };
oppress.new_ResdexId = { Id: result.items[i].id, LogicalName: "new_resdex" };
var createdOppress = createRecordSync(oppress, "new_oppresSet");
refreshArea();
}
});
dialogwindow.show();
}
I am first opening the Lookup Record Window(Using the URL), getting the selected value in the window using dialogwindow.setCallbackReference() and creating the records.
The Script works perfectly fine with the Web Client but does'nt run in the Outlook Client. I guess the function setCallbackReference is not getting called.
Any ideas or any alternatives?
Please help!
Regards,
Kautuk
*This post is locked for comments
I have the same question (0)