Employee time card - error specified cast is not valid.

Userlevel 4

Have been configuring Time Cards for use for employees.  When in the detail line item of the time card, after selecting the earning type, project, project task and labor item, when we get to the day to enter the time, receive an error: cast is not valid.  So I cannot add time.  What would be causing this error? Here is the trace log:

10/6/2022 9:36:29 PM Error:
Specified cast is not valid.

   at _SetValueByOrdinal(EPTimecardDetail , Int32 , Object , PXCacheExtension[] )
   at PX.Data.PXCache`1.SetValueByOrdinal(TNode data, Int32 ordinal, Object value, PXCacheExtension[] extensions)
   at PX.Data.PXCache`1.SetValue(Object data, Int32 ordinal, Object value)
   at PX.Data.PXFormulaAttribute.RowInserted(PXCache sender, PXRowInsertedEventArgs e)
   at PX.Data.PXCache.OnRowInserted(Object item, Object pending, Boolean externalCall)
   at PX.Data.PXCache`1.Insert(Object data, Boolean bypassinterceptor)
   at PX.Data.PXCache`1.Insert(Object data, Boolean bypassinterceptor)
   at PX.Data.PXCache`1.Insert(Object data)
   at PX.Data.PXCache`1.Insert()
   at PX.Data.PXSelectBase`1.Insert()
   at PX.Objects.EP.TimeCardMaint.UpdateAdjustingActivities(EPTimeCardSummary summary, Dictionary`2 dict, DayOfWeek dayOfWeek, DateTime startDate, Boolean skipDescriptionUpdate)
   at PX.Objects.EP.TimeCardMaint.UpdateAdjustingActivities(EPTimeCardSummary summary, Boolean skipDescriptionUpdate)
   at PX.Objects.EP.TimeCardMaint.EPTimeCardSummaryWithInfo_RowUpdated(PXCache sender, PXRowUpdatedEventArgs e)
   at PX.Data.PXCache.OnRowUpdated(Object newItem, Object oldItem, Boolean externalCall)
   at PX.Data.PXCache`1.Update(IDictionary keys, IDictionary values)
   at PX.Data.PXGraph.ExecuteUpdate(String viewName, IDictionary keys, IDictionary values, Object[] parameters)


Best answer by johnythevara48 19 February 2023, 02:37

View original

10 replies

Badge +18

Hello @sheilao08 ,

Can you show a screen shot of what is being entered, please?  Here is an example from my Employee time card.  I enter the hours in Time Spent (not in “Time”).   The field called ‘Time’ does not represent the time I spent working on my tasks.  Acumatica Help shows this definition for “Time”  (Looks like Time represents Start time from appointments, a feature I don’t use in my Timecard.)



Userlevel 4

Thank you for responding.  I tried your suggestion and went to the Details tab and as soon as I hit the Plus key to add a new line, I immediately get the error.  So I cannot add any details.


Badge +18

Hi, Is this screen customized? EP305000.

In  T & E Preferences, what is the first day of the week?  In Employee Classes, what is the Default Date in Timecards on the General Settings tab?

Can you show the Work calendar for the above employee?  Can you show the business date at the top of your screen? 

Are Employees connected to User Logins?

I don’t yet know the cause but I’m trying to eliminate items and see if this leads us to an answer. Thank you.

Userlevel 7
Badge +12


More likely the error is related to customization. Try to unpublish them and check once if you are able to add the details.


Userlevel 4

@laura01Responses to your questions.
1. No customizations on the EP305000 window.  We do have the Automatica Bank Feeds product which is a customization package and also there is a customization on the EP301010 Expense Receipt CLaim.
2.  First Day of the week is Monday in the Preferences window.
3.  Employee Classes, the Default Date in Timecards on the General Settings tab is:  Next Work Day.
4.  Can you show the Work calendar for the above employee?  Attaching image.
5.  Can you show the business date at the top of your screen? Yes
6.  Are Employees connected to User Logins?  Yes.


Badge +18

Hello, I understand the customization is for a different screen, but needs to be ruled out. In customization projects screen, unpublished all customizations briefly.  Does the error still happen? If no, the cause is identified . If the error occurs still, check to see whether the Trace offers a different error. Then republish.
A support ticket may be needed, depending on your results and whether any other posters have ideas.


Userlevel 4

@laura01 Thank you, we have unpublished before, was trying not to have to do that so seeing if anyone had suggestions or ideas first.  We will try that or open a support ticket.  Was trying to avoid unpublishing and not take users out of the system so may be something we have to do after hours before knowing what the issue is.

Thanks for your response.

Userlevel 4

I did not try unpublishing the customization because the same customizations are both in our production tenant and our testing tenant.  When we configured and tested time entries in production, it is working just fine without the error. I’m not sure why the Testing tenant is giving us an error when the same customizations are published to both tenants.  

Userlevel 2

Have you received a solution for this error? I get the same error.

Userlevel 2

It is resolved. In may case, I had renamed the earning type RG to REG. But on the Time & Expenses preferences screen it was still RG.

Changed RG to REG on the Time & Expenses preferences screen

Now I can complete the timecard


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved