Currently in the process of restructuring a portion of script code associated with the Fax Activity Entity within Microsoft Dynamics. Within the script code, the following can be found:
document.getElementById("regardingobjectid").setAttribute("defaulttype", "2");
It has come to my attention that accessing the DOM from a Web Resource is not supported in Dynamics. My goal is to modify this code to something along the lines of:
Xrm.Page.getAttribute("regardingobjectid").setValue({defaulttype: 2})
Unfortunately, there appears to be a lack of documentation on how to set the defaulttype
property for the regardingobjectid
field. While information regarding setting other properties exists, specifics for the regardingobjectid
are missing. How can I securely set the defaulttype
?