Solved

REST HTTP PUT call to Update A DropDown Custom field, 500 internal server error

  • 22 March 2023
  • 2 replies
  • 95 views

Userlevel 2
Badge

Hello everyone!

 

I have a custom field on Shipments Screen telling me the status of the order in a different system, the code is given below:

declaring UsrRWSStatus
the shipments screen for a visual representation

Now I have a service which will update its status to Pick Created , with the following request:

POSTMAN PUT request

But I get this error in response,

"String or binary data would be truncated in table 'AcumaticaDB.dbo.SOShipment', column 'UsrRWSStatus'. Truncated value: 'P'.\r\nThe statement has been terminated.",

 

this as the exception message,

 

I am confused here, am I sending the request correctly, or do I have to change something else in my customization of the DAC?

 

If any more context is required please let me know.

 

Cheers,

Jdeol

icon

Best answer by Vignesh Ponnusamy 24 March 2023, 14:13

View original

2 replies

Userlevel 7
Badge +4

@jdeol, Considering the below error stack, looks like the field length is smaller than in the database.

"String or binary data would be truncated in table 'AcumaticaDB.dbo.SOShipment', column 'UsrRWSStatus'. Truncated value: 'P'.\r\nThe statement has been terminated.",

 

Did you check if the field length in database is rightly? Are you able to save/update the field value from the UI?

Userlevel 2
Badge

Thanks @vigneshponnusamy89 , for pointing me to the correct place.

The problem was in my local DB which was only allowing string of length 1, i changed it and it is working as fine.

 

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