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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Restrict future date or back date on Time Entry

(0) ShareShare
ReportReport
Posted on by 815

Dear Support,

While creating task under PSA module, project manager provide start/end date for the task. But while entering time entry for the specific data is like free form. It is allowing to pick back date or future date.

Solution : When start date and end date set for specific task then in Time entry after selecting that task it should only show option to pick from the start date / end date. Restrict selecting any other date.

Please help us. Thanks !6431.Capture.JPG

Regards / Faisal

I have the same question (0)
  • cloflyMao Profile Picture
    25,210 on at

    Hi Faisal,

    I found that you have added Project Task entity as a lookup field in your Quick Create form.

    So you could try to run custom javascript at Date field onChange event:

    when date value is changed, retrieve Start Date and End Date fields of selected project task record by Xrm.WebApi.retrieveRecord,

    if the date value is not within that two date range, reset Date field to Start Date value of selected project task record, and show an alert dialog to user.

    Regards,

    Clofly

  • Suggested answer
    Manuel Hanak Profile Picture
    135 on at

    Hi Faisal,

    you request seems for me to be very customer dependent. I for example have several customer with different requirements for Time Entry date. An easy way without coding will be to create a sync workflow (yes the old one :) )Wich verify the entered data after clicking on the save button. With sync workflows you can then easily show Error Messages is the entered data is not valid.

    Hope this helps,

    Manuel

  • Syed_Faisal Profile Picture
    815 on at

    Thank you all for the answers.

    Could you pl help us with JavaScript to call the method.

    OR

    Way to create WF process with condition

    Regards / Faisal

  • Suggested answer
    Manuel Hanak Profile Picture
    135 on at

    Hi Faisal,

    sure. I'm using sync. WFs in such scenarios. The one you've asked for could be similar to that:

    pastedimage1588689053952v1.png

    For that example I have used the field "Actual Start" on Project (can be any other Date-Field as well). The result is as follows:

    If I enter a time which does not fit into the condition (Date on Time Entry is after the Date in Acutal Start on Project Entity):

    pastedimage1588689171690v2.png

    An error is shown to the user:

    pastedimage1588689191676v3.png

    And the value/time entry is not being saved:

    pastedimage1588689216916v4.png

    Hope this helps.

    Kr

    Manuel

  • Syed_Faisal Profile Picture
    815 on at

    Dear Manuel,

    Thanks and appreciated for sharing the step, i followed same but no luck for me.

    WF is not restricting or any error throw when back date select.

    PFA screenshot.

    8540.Capture.PNG

    Regards / Faisal

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 456 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans