Question

wanted to update some field in completed state record and i got this error, Error: The record cannot be saved.

  • 24 April 2024
  • 3 replies
  • 37 views

Hello Everybody,

i added an action that i want it to modify a user defined field then 
i want to Call Actions.PressSave()
to save the chages to the database.
but the line Actions.PressSave() is getting this error: Error: The record cannot be saved.

i know that i could use PxDataBase.Update, but the company doesn’t want this solution.

is there any suggestions?
 


3 replies

Userlevel 3
Badge

Hi @mohammadessam53 ,

I am not sure but you can use another approach to save the values using

graph.persist();

Hope, it helps.

Userlevel 2
Badge

@mohammadessam53 You can also try Save.Press(); But I would recommend you to take a deeper look into the error you are getting and share the code so that we can try to understand and suggest better.

Userlevel 7
Badge +5

You haven’t mentioned if opening the order on the screen shows that the order is in a state that can be edited or if the document has been completed and you’re being prevented from being updated. If you can’t edit it on the screen then you have to work on how to get it to where you can update the record.

Have a look at this blog entry that covers how to make fields editable when the document typically can’t be updated:

https://asiablog.acumatica.com/2021/10/enable-customization-fields-when-document-is-completed.html

This forum thread also covers the topic, hopefully it’s of value:

 

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