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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to limit the work hours in phone calls , meetings and tasks.

(0) ShareShare
ReportReport
Posted on by

 

Hello ,

Currently when creating a task or a phone call in CRM, the default hour is 00:00 . is it possible to change it to be affected by the user work hours ?

 

Thanks,

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    jlattimer Profile Picture
    24,562 on at

    One could make the argument that limiting the times available to chose from  would be the best answer - especially if there was a case where they needed to enter a time outside of those hours. You might look at a solution like presetting the start and end times when a new record loads. 

    Something like this firing on form's OnLoad event:

    function OnLoad() {
        if (Xrm.Page.ui.getFormType() == 1) {
            var start = Xrm.Page.getAttribute('scheduledstart');
            var today = start.getValue();
            var curDate = new Date();
            today.setHours(curDate.getHours(), curDate.getMinutes(), 0);
            start.setValue(today);
    
            var end = Xrm.Page.getAttribute('scheduledend');
            today = end.getValue();
            today.setHours(curDate.getHours(), curDate.getMinutes() + 30, 0);
            end.setValue(today);
        }
    }
    

    I'm not sure you can remove a time from the selection - you certainly could do some additional validation on the field's OnChange event to limit the times to a specific range if need be but nothing out of the box if going to limit the times without scripting of some sort.

  • Stef Rose Profile Picture
    240 on at

    Creating a task in CRM is the point of departure of workflow syncing thru different entities available in Dynamics CRM Deployment. You should consider that a task will be first regarless to a group of users since its deployment from the task definition. In this case, because you don't know which user will first create the task and possibly, all users that can create a task have not the same work hours. Moreover, I don't know if you can clearly edit specific time for tasking and phonecall and if it will be a logical way to do it.

  • SyedHussain Profile Picture
    1,820 on at

    I've done it, but I took a different route that is more flexible.

    1. I created a new entity called "Timesheet"; that had the following basic attributes: Timesheet Name, Duration, Cost, Lookup User field, Working hours.

    Entity is enforced by security roles.

    New Timesheets can be created on-the-fly with flexible duration and working hours.

    2. On the Phone Activity Entity, I used OData and json to populate the fields onLoad defending on user connected; but additionally, the user can select several timesheets e,g:

    "Client Follow-up call" - 15mins, charged at $7.00

    3. Calculations are then carried out on the form using Jscript.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans