Hi @mohammadessam53 ,
I am not sure but you can use another approach to save the values using
graph.persist();
Hope, it helps.
@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.
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: