I have alert js that opens html web resource with fetched table data. My fetch works with current record id, which I can't get inside html.
Here is my html :
var invoiceId = parent.window.Xrm.Page.data.entity.getId();
var fetchInv = '<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">';
fetchInv += '<entity name="hms_invoice">';
fetchInv += '<attribute name="hms_customer" />';
fetchInv += '<attribute name="hms_pricelist" />';
fetchInv += '<filter type="and">';
fetchInv += '<condition attribute="hms_invoiceid" operator="eq" value="'+invoiceId+'" />';
fetchInv += '</filter>';
fetchInv += '</entity>';
fetchInv += '</fetch>';
var invoices = XrmServiceToolkit.Soap.Fetch(fetchInv);
Neigther window.parent, nor window.top.opener.parent. , etc, does work.
Any thoughts?
*This post is locked for comments
I have the same question (0)