locked
How to modify the email body before send it? RRS feed

  • Question

  • Hi,

    I need to modify the body of some email before sending them.

    I have created a plugin being executed before the email is sent. During the plugin execution I have:

         -I get the email id from the context.

         -I get the email activity from CRM using the email Id.

         -Once I have the email activity I am modifying the body.

         -I am updating the activity in CRM with my modifications.

    After these steps, my idea is that the mail body should be update according to what I have made in the previous steps, but what is happening is that the email is sent without my modifications but the email activity in CRM was updated with my changes.

    Can any body help me?

    Tuesday, July 6, 2010 5:25 PM

All replies

  • Hi,

    Do you have update rollup 8 or higher installed?  there was a bug in previous ur that often caused a similar behaviour.


    Alex Fagundes - www.PowerObjects.com
    Tuesday, July 6, 2010 8:27 PM
  • Yes, we are using Update Rollup 10.
    Tuesday, July 6, 2010 8:44 PM
  • Hi,

    Make sure that your plugin pre-create not post, so it can update the body before sending the mail.


    Ahmed ElNoby http://ahmedelnoby.blogspot.com
    Saturday, July 10, 2010 2:01 PM
  • Yes, it is regitered on the pre-create and it is still not working.
    Sunday, July 11, 2010 11:21 PM
  • Hi,

    Try to make sure that your code is firing and updating fields like make it update any other field in the pre-create and see if it is updating or not, and make sure of the crm data types are the same.

    Thanks,


    Ahmed ElNoby http://ahmedelnoby.blogspot.com
    Tuesday, July 13, 2010 11:18 AM