Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Open Email in new window

$
0
0

Hi,

I want to open an email activity in new window. I am creating email record using plugin and adding the attachment. I want to open email activity in new window after attachment is added.

code:

#region Creating Draft Email

                Entity Email = new Entity("email");
                Email.Attributes["from"] = ownerId; ;
                Email.Attributes["to"] = new Entity[] { }; 
                Email.Attributes["regardingobjectid"] = new EntityReference("quote", quoteId);
                Email.Attributes["description"] = signature;
                Guid EmailId = service.Create(Email);

                #endregion

                #region CreateAttachment
              
                //Creating Attachment
                Entity emailAttachment = new Entity("activitymimeattachment");
                emailAttachment["subject"] = subject;
                emailAttachment["filename"] = filename;
                emailAttachment["body"] = doc;
                emailAttachment["mimetype"] = mimeType;
                emailAttachment["objectid"] = new EntityReference("email", EmailId);
                emailAttachment["objecttypecode"] = "email";
                Guid Attachmentid = service.Create(emailAttachment);
                #endregion



Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images