locked
Insert Template to email by code RRS feed

  • Question

  • Hello Forum,

    I have a question:

    Can you please tell me how can I insert a template to an existing email activity by code??

    I did some search in sdk and found InstantiateTemplateRequest class but this request doesn't have a parameter of Email ID ??

    Thank you.


    Zarour
    Monday, November 21, 2011 8:50 AM

Answers

  • The InstantiateTemplate request accepts the id of the template that you need to use to generate an Email. It will return an object of the type "email". You can then modify this object and add properties for Sender/Receiver etc... and send the mail. Note the Instantiate template does not create the Email in CRM, it is only a memory representation of an email entity. You need to manually create the email using service.create(email).

    HTH

    Sam


    Web: http://www.inogic.com
    Blog: http://inogic.blogspot.com
    Email: news@inogic.com
    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    • Proposed as answer by Sam - Inogic Monday, November 21, 2011 9:31 AM
    • Marked as answer by zarour Monday, November 21, 2011 11:11 AM
    Monday, November 21, 2011 9:31 AM

All replies

  • The InstantiateTemplate request accepts the id of the template that you need to use to generate an Email. It will return an object of the type "email". You can then modify this object and add properties for Sender/Receiver etc... and send the mail. Note the Instantiate template does not create the Email in CRM, it is only a memory representation of an email entity. You need to manually create the email using service.create(email).

    HTH

    Sam


    Web: http://www.inogic.com
    Blog: http://inogic.blogspot.com
    Email: news@inogic.com
    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    • Proposed as answer by Sam - Inogic Monday, November 21, 2011 9:31 AM
    • Marked as answer by zarour Monday, November 21, 2011 11:11 AM
    Monday, November 21, 2011 9:31 AM
  • Thank you, thats exactly what I have already found . :)
    Zarour
    Monday, November 21, 2011 11:12 AM