Skip to main content
Answer

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

  • April 24, 2024
  • 3 replies
  • 185 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?
 

Best answer by DipakNilkanth

Hi @mohammadessam53 ,

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

graph.persist();

Hope, it helps.

3 replies

DipakNilkanth
Pro III
Forum|alt.badge.img+13

Hi @mohammadessam53 ,

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

graph.persist();

Hope, it helps.


Forum|alt.badge.img+1
  • Acumatica Moderator
  • April 25, 2024

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


Forum|alt.badge.img+7
  • Captain II
  • April 25, 2024

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: