Workflow issue RRS feed

  • Question

  • Hi,

    I have an enquiry.

    I want to build a workflow on the Price List. When the End Date is equal to today, i want to send an email to the user.

    But i'm not able to compare the End Date to today value.

    How is it feasible?


    Wednesday, October 8, 2008 1:24 PM


All replies

  • As this is just sending email to the users, can you create an asynchronous plugin to handle that? You can create a post update plugin for pricelevel entity.


    I really don't think you can crate a workflow activity for Price List.


    Wednesday, October 8, 2008 6:41 PM
  • Actually we can create a workflow for the Price List entity but the problem is with comparing the End Date to Today's date. How can we do it?


    Thursday, October 9, 2008 11:20 AM
  • Hi 1sabene8,

    You would need to schedule a consule application or create a windows service to run daily which retrieves all Price List end dates and send's e-mails if today's date is the same.



    Thursday, October 9, 2008 1:29 PM
  • Hi,

    Thanks for your reply.

    So it's impossible in CRM 4.0 workflows to compare a date to today's date?

    There should be a way somehow.


    Friday, October 10, 2008 5:41 AM
  • Yes.

    Unless you're willing to update all workflows on a daily basis to point to 'todays date' or willing to daily update a custom datetime field for all contacts daily and compare that field to your datetime field...

    You will need custom code.


    Friday, October 10, 2008 6:18 PM


    Thanks Karlo for your replies. Can you please give me a hint or a sample code on how i can achieve what you talked about?

    Tuesday, October 14, 2008 12:24 PM
  • Use Workflow -> Execution time in waiting statement. I believe this solves your issue as its is equivalent to Now.Today.




    Tuesday, October 14, 2008 11:18 PM
  • I think it could be a nice workaround but there's a problem.

    My workflow is executed when the price list is created. So it's execution time will be that date and what i need to compare is the expiry date of the price list with today's date.

    How can i do this?


    Wednesday, October 15, 2008 6:17 AM
  • Hi,
    I found a nice solution.
    Check this:
    • Marked as answer by ms_crm Tuesday, March 31, 2009 7:15 AM
    Tuesday, March 31, 2009 7:14 AM
  • Hi,

    Please use this :

    Use Workflow -> Execution time in waiting statement. I believe this solves your issue as its is equivalent to Now.Today.

    Wednesday, March 20, 2013 1:13 PM