views:

744

answers:

2

I'm building a workflow in Microsoft CRM 4.0 for an Entity E1. In this wf, I have to send an email. In the email, I have to print all entities of E1 that match certain conditions.

For example, it would be great the following mail:

Hi Carl, this is your list of account created until yesterday:

  • account1, info
  • account2, info
  • account3, info

Ho can I do it? It seems I can't!

+1  A: 

You will have to code a custom workflow assembly to create this type of email.

Mikeyb
+1  A: 

Depending on when you need this kicked off there is actually a convoluted way to handle using native workflows. If it will be kicked off when a field on the parent entity changes to a certain value then do this.

  1. On the child entity create a workflow that runs on create and is a child workflow. The first step should be to wait until the relevant field on the parent entity has the correct value.
    1. Then under the wait condition, send your email
    2. Finally start the workflow again as a child workflow
    3. Then end the current workflow.

You can do also sorts of neat hacks if you aren't afraid of waiting workflows

Andrew S.