Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to edit the Time Entry fields in Project Service Automation?

Posted on by 8,282

Is it somehow possible to edit and pretty much completely customize the Time Entry fields in PSA? There might also be a custom entity from which we may need to bring data to the Time Entry form. How should I approach this?

Thanks in advance!

te_2D00_fields.PNG

*This post is locked for comments

  • SwathiD Profile Picture
    SwathiD 200 on at
    RE: How to edit the Time Entry fields in Project Service Automation?

    Hello Antti Pajunen,

    Were you able to customize the fields?

    My requirement is to make the fields internal and external comments mandatory and also change the labels to Comments1 and Comments 2.

    Thanks,

  • Suggested answer
    puet93 Profile Picture
    puet93 110 on at
    RE: How to edit the Time Entry fields in Project Service Automation?

    Hi, i found a way to modify it:

    There is a js web resource called "TimeEntryViewModel.js". (msdyn_/Time/App/Scripts/ViewModels/TimeEntryViewModel.js)

    For example, i needed to modfy the duration list, in the original form you have all hours and minutes, in our business we only use Half Day or Entire Day, so at least i was able to achieve it with this:

    Original Code:

        TimeEntryViewModel.prototype.durationList = function () {
            var list = [];
            var time = "";
            var minutes = [0, 15, 30, 45];
            var i = 0;
            var j = 0;
            for (i = 0; i <= 24; i++) {
                for (j = (i === 0 ? 1 : 0); j < (i === 24 ? 1 : minutes.length); j++) {
                    time = DataUtils_1.default.hoursAndMinutesToTimeString(i, minutes[j]);
                    list.push({ key: time, label: time });
                }
            }
            return list;
        };

    My Code:

        TimeEntryViewModel.prototype.durationList = function () {
            var list = [];
            var time1 = "";
            var time2 = "";
    //       var minutes = [0];
    //       var i = 0;
    //      var j = 0;
    //      for (i = 0; i <= 8; i++) {
    //          for (j = (i === 0 ? 1 : 0); j < (i === 8 ? 1 : minutes.length); j++) {
                 time1 = DataUtils_1.default.hoursAndMinutesToTimeString(4, 0);
                 time2 = DataUtils_1.default.hoursAndMinutesToTimeString(8, 0);
                 list.push({ key: time1, label: time1 });
                 list.push({ key: time2, label: time2  });
    //				}
    //		}	
            return list;
        };

    So basically from this:

    5751.final.PNG

    To this:

    5751.final.PNG


    You have a lot of other options there.

    Of course this is unsopported and could break with an update.

    Regards,

  • PZ123 Profile Picture
    PZ123 on at
    RE: How to edit the Time Entry fields in Project Service Automation?

    Hello, I am wanting to add custom fields to the PSA Time Entry form, but as I read this is not an option within CRM. However, is there a way to use custom form in place of this? Please let me know. Thanks.

  • Andreas Cieslik Profile Picture
    Andreas Cieslik 9,265 on at
    RE: How to edit the Time Entry fields in Project Service Automation?

    Yes, you can create a new form and also add new fields if required.

    This changes should be done in a new solution along with any other customizings you do.

    You could set the new form as the new default form, but you wouldnt not have the same functionality like the original form if not cloned or based on the original main form as it uses some JavaScript code.

    So for testing purposes you could open the original main form and save it under a new name and as a new form and then check if you can do the required customizings. If you get JavaScript error then I would remove the default scripts from the form with the form editor.

  • Verified answer
    RE: How to edit the Time Entry fields in Project Service Automation?

    Hi apa,

    Sorry. This is a custom html resource and you cannot customize this.

    Regards,

    Karthik

    Please mark as verified, if you find this answer useful

    Rep

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans