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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Timezone question - How to view everyone's calendar as 9-to-5, even across timezones

(0) ShareShare
ReportReport
Posted on by 1,160

CRM's default scheduling behaviour is to use a universal time, presented in each user's local timezone. This makes intuitive sense: if I am scheduling a Skype call with someone in Edinburgh, and I live in Kuala Lumpur, we both need to know the local time of the meeting in our specific timezone in order for us to be on Skype at the same correct time.

However, an alternative scenario presents a challenge:

A company has a call centre in Wellington, New Zealand. This call centre runs outbound campaigns to schedule appointments for salespeople, who all work 8am-5pm and live in various different timezones.

The call centre wants to see an 8am-5pm calendar for all salespeople, no matter what timezone the salesperson is in. This enables them to easily know what time during the workday they can schedule the appointment for. I.e. the call centre is performing the role that a Personal Assistant might do, but from one central global location.

This is the default view (note the work day of the call centre, versus the workday of the salesperson in a different timezone, wherein Sam Salesperson's workday is presented in the call centre agent's local timezone):

appointment.png  

Thoughts on best way to achieve a timezone agnostic view? I'm not aware of standard CRM functionality to do this...maybe a custom web resource or such like instead?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi Jonathan,

    I have an idea of how you can do this - I just did something similar but not exactly what you're looking for. Basically, when CRM asks for the records you return it with an adjusted time zone and CRM will handle the rest.

    I think the calendar here is showing service activities, it probably gets them them from a  query which calls the RetrieveMultiple method. Write a plugin on RetrieveMultiple for service activity that only runs for the call center users. When you have the activities that will be returned, modify the start and end dates for the activity by converting the time zones.

    You want to get the time zone for both the Call Center user and the salesperson using code like this:

    int microsoftIndex = 0;
    Entity userSettings = service.RetrieveMultiple(
        new QueryExpression("usersettings")
        {
            ColumnSet = new ColumnSet("timezonecode"),
            Criteria = new FilterExpression
            {
                Conditions =
                {
                    new ConditionExpression("systemuserid", ConditionOperator.Equal, systemUserId)
                }
            }
        }).Entities.FirstOrDefault();
    if (userSettings != null && userSettings.Contains("timezonecode"))
    {
        microsoftIndex = int.Parse(userSettings["timezonecode"].ToString());
    }


    This will give you the MS index for two different time zones - the local time zone for the salesperson and the local time for the call center. So now you have two time zones and a date in UTC. To see what time the Salesperson would see, use this request with the time zone index:

    LocalTimeFromUtcTimeRequest timeZoneChangeRequest = new LocalTimeFromUtcTimeRequest() { UtcTime = startDate, TimeZoneCode = timeZone.MicrosoftIndex };
    LocalTimeFromUtcTimeResponse timeZoneResponse = service.Execute(timeZoneChangeRequest) as LocalTimeFromUtcTimeResponse;
    DateTime timeZoneSpecificDateTime = timeZoneResponse.LocalTime;


    So now the timeZoneSpecificDateTime is what the Salesperson sees, and you want to make sure the call center user sees the same thing, so you want to convert it from Local to Utc but tell CRM your local is the Call Center time by using a UtcTimeFromLocalTimeRequest and using the Call Center timezone code. This is the value you're ultimately looking for - it's a date time in UTC, which when shown in the Call Center time, will display in their local time.

    This could be a little bit of work, but it would be really cool when you're done. Hope this helps! I'd appreciate if you'd mark this as a Verified answer.

    Thanks,

      Aiden

  • Aiden Kaskela Profile Picture
    19,696 on at

    Hi Jonathan,

    Did you make any progress toward meeting this requirement?

    Thanks,

     Aiden

  • Jonny NZ Profile Picture
    1,160 on at

    Hi Aiden,

    Thanks for the help - apologies for the late reply. We went with this sort of approach - read -> convert -> present, then vice versa.

    Cheers,

    Jonathan

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans