Skip to main content

Posts

Showing posts from October, 2017

XrmToolBox: AutoNumberUpdater - new StateCode filter

CRM Email description or body is wrapped with <pre class="mscrmpretag">YOUR CONTENT</pre> tag

Today I intended to process the email description field which contains the body of an email, but got nerved by CRM’s logic. Out of the box CRM does wrap the email body with: <pre class="mscrmpretag">YOUR CONTENT</pre> My plugin code did not expect that as I planned to parse the email’s body of certain email types as XML string (customer’s requirement). To work around this you can use this fix helper class using your own implementation of your deserialized entity class: public static class EmailXmlHandler { /// <summary> /// Gets a serialized Incident instance from a XML string. /// </summary> /// <param name="xmlString">The XML string.</param> /// <returns>Incident instance</returns> public static Incident GetIncidentFromString( string xmlString, ITracingService tracer) { XDocument xmlDoc = null ; Incident ...