{"id":122,"date":"2010-03-15T09:08:00","date_gmt":"2010-03-15T09:08:00","guid":{"rendered":"http:\/\/mahenderpal.wordpress.com\/?p=122"},"modified":"2010-03-15T09:08:00","modified_gmt":"2010-03-15T09:08:00","slug":"custom-workflow-activity-datetimeinput-issue","status":"publish","type":"post","link":"https:\/\/himbap.com\/blog\/?p=122","title":{"rendered":"Custom WorkFlow Activity DateTimeInput Issue"},"content":{"rendered":"<p>I got requirement to get Date for next weekday based on the weekday index input<\/p>\n<p>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.<\/p>\n<p>But I found the custom workflow not working because of the because of the datetime form issue.<\/p>\n<p>What I did, fist I changed CrmDateTime to DateTime and then manipulated DateTime to get next date and converted DateTime to back CrmDateTime.<\/p>\n<p>But because of the usertime not available in datetime, my workflow was going on waiting mode.<\/p>\n<p>I tried lot\u2019s things to get it done and finally I got it working like this<\/p>\n<p>CrmDateTime _CrmTest = CrmTypes.CreateCrmDateTimeFromUniversal(_DateTimeVariable.ToUniversalTime());<\/p>\n<p>Hope it can help somebody \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8230; <a href=\"https:\/\/himbap.com\/blog\/?p=122\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[20],"tags":[],"_links":{"self":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/122"}],"collection":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=122"}],"version-history":[{"count":0,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/122\/revisions"}],"wp:attachment":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}