开发者

CRM 2011 / JScript: Creating/Opening an email reply from an Email ID or a SubGrid

I'm trying to create a button in a form which contains a subgrid of activitypointers, where some of them are emails. This button needs to open the email reply window to the email (The window you get to by opening the email and hitting "Reply") if it is selected in the subgrid - one window for every selected email.

Now I've added the button and I'm able to retrieve the ID of every email that I need to open for, but I don't see how I can open the email reply window as it seems it contains other information than simply the email which to reply to. Any pointers or is this just not possible?

My subgrid contains information in this order: ({guid}, type, index(in the grid), object).. I don't know and I haven't been able to find out what type of object that is - I'm suspecting its the activity object but I don't know how to verify that.

UPDATE: I found somewhat of a solution to this problem, as it is not possible with the built-in controls to open a reply to an email. What I did was open a brand new email and attaching the extra arguments reply_To (Which I added to the form myself), this parameter takes an email ID, and I use that Id on load of email if the parameter is present. I use the ID to look up the email using jQuery + oData after which I fill in the fields. This does leave the problem of not loading the form when saving/sending the mail.. I am currently working on that.

Update 2: I fixed the problem so that it does not fill the form when I don't want it to by 开发者_开发技巧adding a hidden field and setting it to a particular value whenever I don't want it filled. That way, I only fill it if the reply_To is in the query string and the value isn't set to my "DO NOT FILL"-value.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜