use httpcontext in crm 2011 plugin using c# -


I am using the following httpcontext to create the word file of the description of the email unit. It works perfectly But after the execution of this document file, the form is disabled.

  Private Zero exporToWord (string subject, string HTML) {string strFileName = topic + ".doc". HttpContext.Current.Response.AddHeader ("Content-Disposition", "Inline; Filename =" + StruffernName); HttpContext.Current.Response.Clear (); HttpContext.Current.Response.Charset = ""; HttpContext.Current.Response.ContentType = "Apps / MS Word"; Stringbilder strHTMLContent = new stringbilder (); StrHTMLContent.Append (HTML); HttpContext.Current.Response.Write (strHTMLContent); //HttpContext.Current.Response.End (); HttpContext.Current.ApplicationInstance.CompleteRequest (); HttpContext.Current.Response.Flush (); } // end of exporToWord ()  

The subject is subject to email activity and describes the html activity.

Please help me in this regard in your relationship.

Thank you.

"itemprop =" text ">

After writing the HttpContext, CRM plugin functionality is not supported.

A CRM plugin always fires during the event if it is a synchronous plugin, that event will be an answer to the calling client. If you write HttpContext inside the plugin, then you are going to break the event's pipeline and make the transaction incomplete.


Comments