Custom WorkFlow Activity DateTimeInput Issue


I got requirement to get Date for next weekday based on the weekday index input

For example if you need to check what the date on next Monday is, As obvious I created two workflow input variables and wrote logic to get next weekday date.

But I found the custom workflow not working because of the because of the datetime form issue.

What I did, fist I changed CrmDateTime to DateTime and then manipulated DateTime to get next date and converted DateTime to back CrmDateTime.

But because of the usertime not available in datetime, my workflow was going on waiting mode.

I tried lot’s things to get it done and finally I got it working like this

CrmDateTime _CrmTest = CrmTypes.CreateCrmDateTimeFromUniversal(_DateTimeVariable.ToUniversalTime());

Hope it can help somebody 🙂

Advertisements

1 Comment

Filed under Workflow & Plugin Development

One response to “Custom WorkFlow Activity DateTimeInput Issue

  1. cooper

    helped me. thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s