Click or drag to resize

IOperationServiceUpdateDocument Method

Replaces the complete non-empty contents and comment of an unsent document. Operation and manually selected warehouses cannot change.

Namespace: Resto.Front.Api
Assembly: Resto.Front.Api.V10 (in Resto.Front.Api.V10.dll)
Syntax
C#
IDocument UpdateDocument(
	Guid documentId,
	int revision,
	IReadOnlyList<DocumentItemData> items,
	string comment,
	ICredentials credentials
)

Parameters

documentId  Guid
Identifier of the locally stored document.
revision  Int32
Revision from the last read document snapshot. Re-read the document after a change conflict before retrying.
items  IReadOnlyListDocumentItemData
Complete non-empty replacement contents of the document; existing lines are replaced.
comment  String
Document comment, also used as the reason of writeoff when required. Required reasons are trimmed when saved. Null clears the comment.
credentials  ICredentials
The credentials returned by AuthenticateByPin(String) method.

Return Value

IDocument
Exceptions
ExceptionCondition
PermissionDeniedExceptionThe caller has insufficient document permissions.
ConstraintViolationExceptionDocument data or state violates Front rules.
EntityModifiedExceptionRe-read the document and review the changes before retrying.
EntityAlreadyInUseExceptionThe document is locked by another operation.
ServerConnectionExceptionCommunication with Front failed while saving the document.
See Also