Skip to Content
Technical Articles

Employee Central Time Sheet – How to restrict employee entering time records in previous calendar month

Hello Readers,

Customers have asked the following scenario in EC Timesheet and hence I decided to create a short blog on that.

Scenario:

Employees using timesheet should enter their time records only for the current calendar month and restrict any entry before that. Since the current timesheet is only weekly, most weekly timesheets have overlapping months and in such case any entry before the first of month should be restricted. This means in single timesheet should have validation to enter or restrict specific entry.

E.g. of overlapping months within a single timesheet period

EE can enter time entries from 1st -5th Oct and restrict entering 29th & 30th September.

Admin: Admin should not have any restriction. EE will raise request Admin for any retro input beyond current calendar month.

Solution:

Please note that the Validation Rule of the Time Recording Profile cannot perform this check because the context of validation rule is only Time Sheet Day which will has time entry start date but not booking day object.

Also note that Time Recording Permissibility in Job Info will not serve the purpose as well.

Step1:

Go to Admin Centre -> Manage Workflow Groups -> Create New Group

Add all Time Admin user to People Pool and Update.

Step2:

Rule: Create business rule with base object as Employee Time Sheet.

Write a similar rule as above. The key here is the use of Time Valuation Result ->Booking date as validating object which serve the purpose of this scenario.

Create a message definition according your requirement.

Step3:

Go to Object Definition and choose object EmployeeTimeSheet.  Add this rule on Save Rules.

Testing:

Role: Employee: Enters data on 30th September

Role: Employee: Enters data on 1st October

 

Role: Admin

 

Hope this helps !!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

9 Comments
You must be Logged on to comment or reply to a post.
  • Hello Parthiban,

     

    Thanks for sharing this blog.

     

    I have tried to restrict the employee to enter those time records but i am getting this message in the rule: “Retrieved ‘EmployeeTimeSheet.employeeTimeValuationResult’. Value: ‘null'”. Do you know what could be causing this issue?

     

    Thanks & Regards

    • Hi Cesar,

      This error comes when the time type you enter is not evaluated. One of our colleague came up with the same error and it was solved.

      Make sure the time type you enter is getting evaluated in the rule, because if the if condition is “booking date” from evaluated result and not from timesheet date.  Hope this resolves your issue.

      • Hi Parthiban,

         

        The rule was not working because the field “Time Pay Type” in “Time type Group” was set to “No”. I changed it to “Yes” and now the rule is being triggered.

         

        Thanks a lot for your Help!

  • Hello Parthiban,

    This is a good idea, but as per Timesheet Engineering, this configuration has a little flaw. If there is already a record in the previous month in the time sheet that overlaps two months, then the rule will prevent the update of this two-months-time-sheet. So far there is no proper solution to cover this requirement, too.

    Thank you!

    Benedict