locked
Is it possible to send mail when a contact is added to marketing list (Urgent) RRS feed

  • Question

  • Hello ,

    My requirement is to send mail to contact using workflow, when that contact is added to particular marketing list which is already existed. Is it possible, How can i do this. Its a very urgent requirement , please help solve this.


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

    Thursday, March 21, 2013 4:50 AM

Answers

  • Hi,

    Below code will give you the contact id. 

    if (context.InputParameters.Contains("EntityId") &&
    context.InputParameters["EntityId"] is Guid)
    {
    Guid entityId=(Guid) context.InputParameters["EntityId"] ;
    }


    Chandan - http://mscrm-chandan.blogspot.in/ I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful !!!

    • Marked as answer by Madhu-CRM Thursday, March 21, 2013 8:27 AM
    Thursday, March 21, 2013 7:00 AM

All replies

  • Hi Madhu,

    Even marketing list is a entity in MSCRM , so u can create a workflow "onCreate" of Marketing List entity where u can send mail

    Thursday, March 21, 2013 5:33 AM
  • Hi Madhu,

    You wont be able to achieve your requirement in workflow, but it is very much possible through Plugin. Register a plugin on AddMember message. The plugin will trigger the moment a member is added to the marketing list. You can capture the contact details and send the email to the contact. 

    Below find the link for the same. 

    http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/d632e358-0452-4c12-a55b-f1e2cfb1cba0


    Chandan - http://mscrm-chandan.blogspot.in/ I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful !!!


    Thursday, March 21, 2013 5:36 AM
  • Thanks Nandan,

    When i create a marketing list i can set up work flow and send email but is it possible to send mail when a record is added to marketing list. For example, Marketing list A is already created in CRM. I create a contact record and add it to marketing list A , as soon as user fills contact form in particular web site. When i add this contact record to marketing list, a mail should be sent to only that particular contact record in crm.


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

    Thursday, March 21, 2013 5:39 AM
  • Thank you Chandan ,

    I'm trying to do as you have suggested. Can you please share some sample code to trigger plugin when record is added to marketing list. Below is the plugin template i used, but the control is exiting without entering to the below condition,

    if (context.InputParameters.Contains("Target") && context.InputParameters["Target"] is Entity)
                {
                    // Obtain the target business entity from the input parmameters.
                    entity = (Entity)context.InputParameters["Target"];
    
                    // TODO Test for an entity type and message supported by your plug-in.
                    if (context.PrimaryEntityName != "list") { return; }
                    if (context.MessageName != "AddMember") { return; }
                }
    Please help me knowing where i'm doing mistake. Thank you once again. Also can you please tell me how to get the record details added to marketing list.

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


    • Edited by Madhu-CRM Thursday, March 21, 2013 6:46 AM
    Thursday, March 21, 2013 6:45 AM
  • Hi,

    Below code will give you the contact id. 

    if (context.InputParameters.Contains("EntityId") &&
    context.InputParameters["EntityId"] is Guid)
    {
    Guid entityId=(Guid) context.InputParameters["EntityId"] ;
    }


    Chandan - http://mscrm-chandan.blogspot.in/ I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful !!!

    • Marked as answer by Madhu-CRM Thursday, March 21, 2013 8:27 AM
    Thursday, March 21, 2013 7:00 AM