Hi,
I have a question relating with processing form context from UI through JavaScript.
Generally I have found that there is an option to use Xrm.Internal.isUci(), but I have found that is unsupported way.
Do you have any other way to detect if the user uses United Interface (HUB) or Classic App?
Or If it's not possible to detect Context of the form, do you have any way to display sharepoint library directly on the form in United Interface?
I need it, because I have script on account form load, which is loading SharePoint Library:
function setIFrameConent() { if(Xrm.Page.getAttribute("sup_name").getValue() != undefined && Xrm.Page.getAttribute("sup_name").getValue() != null) { var recordId = Xrm.Page.data.entity.getId().replace("{", "").replace("}", ""); // Entity record Id var oTypeCode = Xrm.Page.context.getQueryStringParameters().etc; //Entity Type code. var CurrentFormId = Xrm.Page.ui.formSelector.getCurrentItem().getId().replace("{", "").replace("}", ""); Xrm.Page.getControl("IFRAME_sharepointlibrary").setSrc(Xrm.Page.context.getClientUrl() + "/userdefined/areas.aspx?formid=" + CurrentFormId + "&inlineEdit=1&navItemName=Documents&oId=%7b" + recordId + "%7d&oType=" + oTypeCode + "&pagemode=iframe&rof=true&security=852023&tabSet=areaSPDocuments&theme=Outlook15White"); // IFRAME_Documents is the name of the Iframe on the form. } else { Xrm.Page.ui.tabs.get("tab_2").setVisible(false); } }
Unfortunately this code works only on classic app, not on United Interface.
Can you help me ?