Question

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.

 

 


4 replies

Userlevel 2
Badge +1

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. 
Userlevel 7
Badge +9

@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.

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.

@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.

Reply


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