locked
Workflow - Note Text Update RRS feed

  • Question

  • I have created a workflow that sends email notification to users (based on specific conditions on the Contact entity). The user wants to also see, in the body of the email, the last note description.

    I don't know how to get the note text to show up in the body copy. So, I created a hidden Comments field (ntext) and created a workflow that based on the Note entity (and on creation of a new note), updates the Contact's Comments field with the Description(Note).

    Sends out the email but the body copy is blank. What am I doing wrong?

    Appreciate a response asap.

    THANK YOU!


    Apps
    Friday, April 8, 2011 6:05 PM

Answers

  • Hi,

    Glad you got there with the timeout condition. As for your additional requirement;

    Try adding a new hidden 'note updated' date&time field that is updated at the same time as your hidden comments field with the execution date/time. Then, add another IF condition between your 'timeout' and 'send email' steps that checks the note updated field to see if a note update took place in the last 2 minutes and if not, clears the hidden notes field.

    TIMEOUT (as in your last post)... then

       IF Contact 'Note Updated' On or before Process-(2 minutes Before Execution time)

           UPDATE contact (clear hidden notes field)

    SEND Email

    Rob

     


    Microsoft Certified Technology Specialist (CRM) GAP Consulting Ltd.
    Monday, April 11, 2011 8:37 PM
    Answerer

All replies

  • Hi

     

    I am assuming that you ahve two worklfows: One for populating the hidden commnets field with the notes description. Is this workflows working properly? Please unhide the field and check if it is working properly.

    The next workflows would be for actually sending out the email to the contact. This would populate the email body with the text in the comments field. Could you kindly check if this workflow is working properly - ie, type something in the comments field and see if it is appearing in the email body.

    you need to debug each workflow independtly and then combined to detmine where the issue lies. Another possibility is since workflows are asynchronous in nature, the second workflows might have fired before the first workflow has finished execution!

    Thanks and Regards

    AniMandal

    http://xrmadventures.wordpress.com/

    • Proposed as answer by AniMandal Friday, April 8, 2011 9:57 PM
    Friday, April 8, 2011 9:57 PM
  • Hi,

    Your idea is a sound one I think. For testing, could you add your hidden comments field to the form and ensure your update workflow is published?

    Also, I'm assuming you are inserting the hidden field into the body of your email workflow step?

    Are you using v4 or 2011?

    Rob


    Microsoft Certified Technology Specialist (CRM) GAP Consulting Ltd.
    Friday, April 8, 2011 10:00 PM
    Answerer
  • hello.

    OK. I tested both workflows and they work separately. Note description appears in the Comments field. However, I believe that your comment about both being 'asynchronous in nature' probably is the problem. Because if I make the second worfkflow (sends the email notification) on demand and choose the specific record that  i have just created and added a note, it works...the email gets sent with the comments in the body

    I need the Notes-to-comments workflow to run first (or actually any time...just make sure it updates the comments field with the last comment) . Then, once the contact workflow sends the email notification, the comments field should show in the body copy.

    what am I doing wrong and how do i fix it?

    thanks...fyi...I am inserting the hiddent field in the body of my email...{Comments:Contact} and we aer using V4.

    Appreciate your immediate response.


    Apps
    Saturday, April 9, 2011 7:54 PM
  • Hi,

    OK, so your workflows are working but you need to ensure that when a user adds a note and updates X fields on the contact, the notification mail needs to send once the 'notes update' workflow has completed.

    Try adding a timeout condition at the beginning of your email notification workflow of say 2 minutes. 2 minutes should give the notes/comment field update workflow time to complete before the email notification is executed.

    Rob


    Microsoft Certified Technology Specialist (CRM) GAP Consulting Ltd.
    Sunday, April 10, 2011 8:53 PM
    Answerer
  • Hi, Rob

    Did not work. I put a timeout (2 min) condition at beginning of email workflow and it still did not work. However, I then decided to add the email notification portion to the Notes comments workflow and it worked.

    Unfortunately, this main workflow is based on Note being created and then email notification being sent out with Comments field being populated. There may not always be a note and the email notification has to go out regardless if there is a note or not.

    Bernardina


    Apps
    Monday, April 11, 2011 11:36 AM
  • Rob

    Where should I put the timeout condition? Let's see if maybe I am not doing this correctly.

    If (condition) then

    ....wait unitl workflow-executiontime equals [minutes; 2 after Status:Created On], then

    send email...

    Is this correct?


    Apps
    Monday, April 11, 2011 2:36 PM
  • I got it to work. I put the timeout condition in (as shown in my last post) and it seems to work.

    If (condition) then

    ....wait unitl workflow-executiontime equals [minutes; 2 after Status:Created On], then

    send email...

    *******

    I have one last question on this, however. I just verified with customer that they want....

    If they do not add a new note, clear out what was in the hidden field.

    Is it possible to do this?

    Thanks


    Apps
    Monday, April 11, 2011 4:55 PM
  • Hi,

    Glad you got there with the timeout condition. As for your additional requirement;

    Try adding a new hidden 'note updated' date&time field that is updated at the same time as your hidden comments field with the execution date/time. Then, add another IF condition between your 'timeout' and 'send email' steps that checks the note updated field to see if a note update took place in the last 2 minutes and if not, clears the hidden notes field.

    TIMEOUT (as in your last post)... then

       IF Contact 'Note Updated' On or before Process-(2 minutes Before Execution time)

           UPDATE contact (clear hidden notes field)

    SEND Email

    Rob

     


    Microsoft Certified Technology Specialist (CRM) GAP Consulting Ltd.
    Monday, April 11, 2011 8:37 PM
    Answerer
  • thanks, Rob. That will work. Appreciate your quick response.
    Apps
    Thursday, April 14, 2011 10:44 AM