Skip to main content
Answer

"Unable to cast object of type 'System.DateTime' to type 'System.String'" on login page.

  • February 24, 2024
  • 2 replies
  • 157 views

aaghaei
Captain II
Forum|alt.badge.img+10

Has anyone come across this issue when upgrading your customization packages from 2022R2 to 2023R2 when trying to log in to Acumatica that prevents you from getting in? I am not using any Nuget for this project.

The Customization Project has nothing to do with the login pages or associated business logics like User Prefereneces or General Preferences …

This thing is killing me and have wated over a full day on it. If someone has any idea or is willing to a remote I will be more than happy to send a Teams invite at their convenient.

This project has been working perfectly since 2020 with no issues.

Best answer by aaghaei

I figured it out. It seems effective 2023 release Acumatica has done something that loads the classes which are decorated with [PXLocalizable] to be loaded and translated (I guess but couldn’t find any documentations). I have some date constants in one of these classes. The platform when loading, was trying to convert them to string and because of that it was raising error (still I don’t know why it should raise error). As of 2022R2 this was not the case.

 

2 replies

aaghaei
Captain II
Forum|alt.badge.img+10
  • Author
  • Captain II
  • Answer
  • February 24, 2024

I figured it out. It seems effective 2023 release Acumatica has done something that loads the classes which are decorated with [PXLocalizable] to be loaded and translated (I guess but couldn’t find any documentations). I have some date constants in one of these classes. The platform when loading, was trying to convert them to string and because of that it was raising error (still I don’t know why it should raise error). As of 2022R2 this was not the case.

 


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • February 25, 2024

Thank you for sharing your solution with the community @aaghaei!