Skip to main content
Solved

Unable to cast object of type 'System.Int32' to type 'System.String'.


we upgraded the version from 22r2 to 23r2. after rebuild the solution while try to open in browser for login page getting the following error.

 

 

Best answer by NicholasBova52

Hello @arpithak41, I just have a couple questions to better understand your issue.

  1. Does your customization use any new or existing data views that take any parameters? If so, I would check to make sure that the data types of the parameters match their corresponding DAC fields. It’s possible that between 22R2 and 23R2 that the data type for one of the system fields has changed, causing this error.
  2. Does your customization contain a cache extension that modifies any existing system fields? If so, I would also check there to make sure the data types in the extension match the original field. 
View original
Did this topic help you find an answer to your question?

5 replies

NicholasBova52
Acumatica Employee
Forum|alt.badge.img+1
  • Acumatica Employee
  • 27 replies
  • Answer
  • May 3, 2024

Hello @arpithak41, I just have a couple questions to better understand your issue.

  1. Does your customization use any new or existing data views that take any parameters? If so, I would check to make sure that the data types of the parameters match their corresponding DAC fields. It’s possible that between 22R2 and 23R2 that the data type for one of the system fields has changed, causing this error.
  2. Does your customization contain a cache extension that modifies any existing system fields? If so, I would also check there to make sure the data types in the extension match the original field. 

aaghaei
Captain II
Forum|alt.badge.img+10
  • Captain II
  • 1203 replies
  • May 3, 2024

@arpithak41 Likely you have a customization including a class used to localize and display messages and is decorated with [PXLocalizable]. Possibly in this class you have non-string values like int or date. Move these declarations out somewhere else which is not decorated with [PXLocalizable] and the error should go away.


  • Author
  • Freshman I
  • 2 replies
  • May 16, 2024
NicholasBova52 wrote:

Hello @arpithak41, I just have a couple questions to better understand your issue.

  1. Does your customization use any new or existing data views that take any parameters? If so, I would check to make sure that the data types of the parameters match their corresponding DAC fields. It’s possible that between 22R2 and 23R2 that the data type for one of the system fields has changed, causing this error.
  2. Does your customization contain a cache extension that modifies any existing system fields? If so, I would also check there to make sure the data types in the extension match the original field. 

Thank you will look into your suggestion.


  • Author
  • Freshman I
  • 2 replies
  • May 16, 2024
aaghaei wrote:

@arpithak41 Likely you have a customization including a class used to localize and display messages and is decorated with [PXLocalizable]. Possibly in this class you have non-string values like int or date. Move these declarations out somewhere else which is not decorated with [PXLocalizable] and the error should go away.

Thank you will look into your suggestion.


Forum|alt.badge.img
  • Freshman II
  • 13 replies
  • July 29, 2024

For customizations .. I has this error..
In version 24r1, this is an error related to the [PXLocalizable] attribute. This error occurred when a class marked with [PXLocalizable] contained properties and fields that were not constant strings. Specifically, the error would occur during customization builds without necessarily publishing.  Interestingly, this issue did not affect version 22r2 but  recent version, 24r1. Mark only the appropriate class with the [PXLocalizable] . I hope it helps someone ;-)


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings