locked
MS CRM Workflow Check Condition Compare Date Only RRS feed

  • Question

  • I would like to know if there is any way to compare the date only of two DateTime fields in CRM 2011 workflow.

    I thought "On" operator would achieve the desired result but it's not working as expected and the condition checking skipped when two dates with values "19/06/2014 10:10" and "19/06/2014 20:23" are compared with "On" operator.

    The requirement is to send email 7 days, 14 days, 21 days, 28 days, etc. after last modified on.

    So, I set up "Executing Dynamics CRM workflows based on a FetchXML query" to trigger the workflow everyday and use the "CRM Manipulation Library" to add days to the ModifiedOn and compare with the Process Execution Time.

    So, the check condition must be "(ModifiedOn + 7 Days).Date == Process Execution Time.Date" but I couldn't really compare the date only.

    Thursday, June 19, 2014 12:37 PM

All replies

  • I didn't do tests with the On operator as your example, but if I was you I will create a small custom workflow activity to compare the two dates  (2 dates as inputparameter, 1 boolean outputparameter) maybe not so efficient but you can reuse also in other workflows.

    My blog: www.crmanswers.net - Rockstar 365 Profile

    Thursday, June 19, 2014 12:53 PM
  • If there's really no option with out of the box feature, I've got to implement a custom workflow activity. :(
    Thursday, June 19, 2014 12:59 PM