web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Workflow Timeout until DateTime not working.

(0) ShareShare
ReportReport
Posted on by 189

I'm configuring a workflow that needs to wait a given length of time before proceeding. The workflow receives a DateTime value that the workflow needs to wait until. The problem is that the workflow runs immediately and does not wait for the given time. My thoughts is that somehow this is being converted to UTC time potentially? 

Plugin-1.PNG

Plugin-2.PNG

*This post is locked for comments

I have the same question (0)
  • JFulfordMS Profile Picture
    189 on at
    RE: Workflow Timeout until DateTime not working.

    I set the workflow to run 1 minute AFTER the time specified, and it only waited 1 minute from the time the process started. The time returned from the plugin was several hours in the future.

    5086.Plugin-3.PNG

  • Verified answer
    Kokulan Profile Picture
    18,054 on at
    RE: Workflow Timeout until DateTime not working.

    Hi

    It looks like your plugin.Time returns the current time and thats why it only waits for a minute.

    One of the recommended approach when doing waiting workflow is, i possible keep the date and time in a field on the entity.

    Could you add a field to the entity and save the plugin.Time to that field and let your waiting logic to wait on that field value rather than the returned value.

    This would also give you chance to see the actual value returned by your plugin.Time

  • JFulfordMS Profile Picture
    189 on at
    RE: Workflow Timeout until DateTime not working.

    7028.Plugin-4.PNG

    Unfortunately I've tried this and it doesn't work. Notice the postpone until and the datetime highlighted on the right. That is the record updated in the workflow step with the time returned from the plugin.

  • JFulfordMS Profile Picture
    189 on at
    RE: Workflow Timeout until DateTime not working.

    Reading the timeout value from the entity itself works and the postpone time is correct. I see this as a workaround though and not an actual solution to this issue. Seems this is a bug.

  • JFulfordMS Profile Picture
    189 on at
    RE: Workflow Timeout until DateTime not working.

    [quote user="Kokulan"]

    Hi

    It looks like your plugin.Time returns the current time and thats why it only waits for a minute.

    One of the recommended approach when doing waiting workflow is, i possible keep the date and time in a field on the entity.

    Could you add a field to the entity and save the plugin.Time to that field and let your waiting logic to wait on that field value rather than the returned value.

    This would also give you chance to see the actual value returned by your plugin.Time

    [/quote]

    The method you mentioned by reading the DateTime from an entity works. However, that same DateTime set directly in the plug-in does not work as expected. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#2
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans