06.12.2018, 18:11 | #1 |
Участник
|
crmtipoftheday: Tip #1205: Local time in Flow using Common Data Service
Источник: https://crmtipoftheday.com/1205/loca...-data-service/
============== Remember the times when you wake up and struggle to figure out where you are or what time it is? Of course, you don’t. I personally can’t recall those because lack of space and time awareness goes hand in hand with the selective amnesia. We did create a flow to help you on those occasions. That flow worked using trigger tokens (and Bing Maps API) that work when you actually push the button on a mobile device. Sometimes you don’t have a button to push, or time is unrelated to the flow itself. I am talking about datetime fields in Common Data Service, of course. Those are UTC as well so how do we convert the values into the realm of a user? It could be the user who pushed another button, or user who invoked a flow from their model-driven app, or simply the user who created the record in the first place. Why does it matter, apart from the reasons we described in tip #1141? Imagine sitting on a beach in Hawaii, doing the numbers and, bingo!, you close that elusive sale in the evening on September 30, just in time to make your quota for the quarter. Except that you didn’t because it was already October 1 in the UTC timezone so here goes your quarterly bonus. Since we don’t have the user location, we’d have to use user options that actually exist precisely for the purpose of localizing datetime values: Getting from a user to the timezone in the format we need is not a one-step operation so these are the steps: (and remember I promised to cut down on the screenshots so here we are):
Since we have limited number of pictures, you can download, import, and dissect the flow in your own environment. You’ll need to provide your own Office 365 Users and Common Data Service connections. (Cover photo by Heather Zabriskie on Unsplash) Источник: https://crmtipoftheday.com/1205/loca...-data-service/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|