locked
How to embed a dynamic table from CRM into a workflow email ??? RRS feed

  • Question

  • I am looking for a way of embeding a dynamic table from CRM into a workflow email to be sent out can anyone help or advise.
    CRM User
    Friday, October 29, 2010 8:20 AM

Answers

All replies

  • Hello, Mick.

     

    It seems that this can't be done without additional coding. Custom workflow activity can help you.


    Microsoft CRM Freelancer

    My blog (english)
    Мой блог (русскоязычный)
    Friday, October 29, 2010 8:40 AM
    Moderator
  • As Andriy said you may need to develop Custom Workflow Activity.

    Can you provide more details on what you are trying to acheive? what do you specify by "dynamic table from CRM"? so that we can try if there is any workaround is possible.

    Friday, October 29, 2010 9:19 AM
  • Hi,

    We are would like to attached a entity table containing upto 7/8/ entries of vehicle details related to one Account customer as a servicing reminder.

    We are are awere that this will require a certain amout of coding do you have any sample code to do this.

    Mick


    CRM User
    Friday, October 29, 2010 1:27 PM
  • Hello, Mick.

    I have provided the start point for development of custom workflow activities in my previous post.

    I don't think that I have similar solutions on my blog but as a working samples you can check following - http://a33ik.blogspot.com/search/label/Custom%20Workflow


    Microsoft CRM Freelancer

    My blog (english)
    Мой блог (русскоязычный)
    Friday, October 29, 2010 1:39 PM
    Moderator
  • As Andriy said this "Custom workflow" will be a perfect solution for you.

    You can also try for a workaround. Kindly correct me if I wrongly understood you.

    Assuming you are triggering email when a record is created.

    1. Onsave() event use javascript CrmService RetrieveMultiple/Fetch to obtain the entries (7/8 vehicle details)

    2. Embed the output records as HTML formatted tag and store it in a text attribute (say "new_WorkflowEmailContents"). For this you may need to concadinate obtained result values with the html tag node. You final result should be as below. 

    e.g.  crmForm.all.new_WorkflowEmailContents.DataValue  = '<table border="1"><tr><th>Vehichle Code</th><th>Details</th></tr><tr><td>0001</td><td>Details 1</td></tr><tr><td>0002</td><td>Details 2</td></tr></table>';

    3. Create a worflow which will trigger on created of your record.

    4. Map the "new_WorkflowEmailContents" attribute in the email body. Since the email body supports html tag, the contents will be stiped as in a tabular format.

     

    Friday, October 29, 2010 2:48 PM