locked
Can I delete email activities via workflow RRS feed

  • Question

  • I  have  email activities created when ever a user changes a record.

    after the email is sent, I want to delete all these email activities.

    I dont want it in the system

    how to acheive this.

    Friday, June 7, 2013 3:20 PM

Answers

All replies

  • Hi Nandhini,

    You can do this. but for this you need to write a custom workflow activity , where you will check that if you email status is send/completed then delete that email record.

    Refer this link for creating custom workflow activity :

    http://msdn.microsoft.com/en-us/library/gg334455.aspx

    Note : We can not delete a record using basic UI based WF.

    Hope this will help you.


    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.


    Friday, June 7, 2013 3:38 PM
  • As K.S mentioned a good solution is to add a custom workflow activity for the delete of the records.


    My Weblog | My Website

    Friday, June 7, 2013 3:52 PM
    Moderator
  • Is there any link the specifies creating custom workflow for creating email.

    I am new to custom workflows

    Friday, June 7, 2013 4:05 PM
  • For a general and good help have a look at this MSDN article. As a good walk through have a look at this article.


    My Weblog | My Website

    Friday, June 7, 2013 4:09 PM
    Moderator
  • Go through the given MSDN link. when your record is updated retrieve the emails records & check its "statecode" field value, if it is "Sent/Complete", then call the Service.Delete() method for deleting the email record. 


    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.


    • Edited by K.S-1637 Friday, June 7, 2013 4:27 PM
    Friday, June 7, 2013 4:26 PM