Home > Forum > Actions > SDK, add mandatory comment on request to move the document

SDK, add mandatory comment on request to move the document
0

Hello,
I have a process, in which the "pathId" transition paths require adding comment.
However, in SDK I am unable to find a way to move the document along this path due to missing comment.

private async Task CancelInstance(DocumentsManager manager, int documentId, int pathId) {
___var document = await manager.GetDocumentByIdAsync(documentId);
___await document.Comment.AddCommentAsync("Adding comment required for this transition");
___await manager.MoveDocumentToNextStepAsync(new MoveDocumentToNextStepParams(document, pathId));
}

Result (translated by me): "ValidationError: Comment is required on path: PATH_NAME"
Am I doing something wrong?

Nobody has replied in this thread yet.
Did you know that with WEBCON you can automate virtually any process? Even baking cookies 🍪
 
Speaking of cookies: we use the ones that are essential for our website to function properly, as well as additional ones that help us customize our content to your preferences. If you don’t mind cookies, click Accept. If you want to learn more, explore settings.
Settings