I posted this question last night and this morning it is gone. This is the second question I posted that disappeared over night. Hopefully these are not getting lost!
I've been working with CRM 2011 the past few weeks and I have been building some HTML pages and using JavaScript. However, I am running out of time to determine how best to implement a few things. So I am hoping to get some ideas, thoughts, suggestions, maybe code snippets, etc. from others that might have already gone this route.
What I am doing is replacing some dialogs with HTML pages because they cannot do some things that I need. So I have been working through how to build HTML/JavaScript pages in CRM and moving the work the dialog is doing over to the HTML page. However, I am having a couple of issues.
1. Email... can you create an email template in CRM then via JavaScript use that template to send an email?
2. How do you load a dropdown list from an HTML/JavaScript web resource and using the REST JQuery service? I have a custom entity with a name field and I would like to load a dropdown list with these names. I've seen examples, but they are not
very good in regards to explaining how to do this. I've coded this up a few different ways but cannot get it to work. So I am looking for a good example of how to do this.
3. I have been calling the "Lookup record" form from my HTML page, but I cannot get it to work in IE9. When the lookup page pops up, the size of the window is not being controlled by the JavaScript. I know that the code is correct, as if I change the URL to other pages, it works fine. But when I call the lookup record form and set it's height to say 800 and it's with to say 500, it resizes to only show the first sentence at the top. It ignores the height and width settings. On my HTML pages, I am adding lookup fields and I would like to use the built-in lookup record form to maintain consistency between my custom pages and the CRM forms.
4. I suspect that with the need to email and the need to load the dropdown lists, that maybe this would better fit a plugin. With the plugin at least I can focus on C# and not JavaScript, so I suspect it would be easier to work with. Also, I don't like the idea of hitting the db with JavaScript anyway. I've always preferred using an architecture of some sorts with a datalayer as a class library or web service. It seems putting db code in client-side JavaScript is maybe not the best approach. So plugins seem to be a better design. Has anyone else considered this and made similar decisions? Did it work out well?
Any thoughts, suggestions, or samples are much appreciated. My main concern right now is getting the dropdown list working and the loopup form to show up correctly. If you are doing this and it is working for you, please share how you are able to get this to work for IE9.
Best regards,
Jon Rothlander
Jon Gregory Rothlander