In our organization we want the Email entity's "To" party list to be limited to just one custom entity which will basically act like our internal address book in Outlook. I've searched all over the internet and read several pieces of example code, but I don't see a supported way to do this. The best solution I've seen is in https://community.dynamics.com/crm/f/117/t/128748, but it is using the unsupported method document.getElementById().
Another option I came across is http://stackoverflow.com/questions/29256667/lookup-contacts-instead-of-accounts-on-emails-in-ms-dynamics-crm-2013 but to use this I would need to hard-code the GUID for a View of our custom entity. To get around hard-coding, I could query the database for a specific view name and if it doesn't exist, NOT change the view, but this is a less than ideal method that I'd rather avoid.
I'm hoping someone can point me to a support method.
Instead of document.getElementById("to_i").setAttribute("defaulttype", "8"), could Xrm.Page.getControl("to_i").getAttribute("defaulttype").setValue("8") work instead?
*This post is locked for comments
I have the same question (0)