Hello,
Currently im fighting with Interactive Service Hub and Javascript.
I wrote a small script to display fields and delete field data depending on the settings made on a “two option field” (requestertype).
It works fine within the normal Web-Gui, within the Interactive Service Hub it looks like the event is just fired once.
I was adding the same javascript webresource to the standard form and to the the form of interactive experience (on control “requestertype”).
Anyone has an idea what could be the problem ?
Thanks and best regards,
Ralph
Code:
function OnChangeRequesterType()
{
var requestertype = Xrm.Page.getAttribute("requestertype").getValue();
if (requestertype == false) // if internal requester
{
Xrm.Page.getAttribute("requesterexternal").setValue(null); //deletes field external requester
Xrm.Page.getControl("internalrequester").setVisible(true); // show field internal requester
Xrm.Page.getControl("requesterexternal").setVisible(false); //hide field external requester
}
if (requestertype == true) // if external requester
{
Xrm.Page.getAttribute("internalrequester").setValue(null); //deletes field internal requester
Xrm.Page.getControl("requesterexternal").setVisible(true); // show field internal requester
Xrm.Page.getControl("internalrequester").setVisible(false); //hide field external requester
}
}