Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Document Sharing] Add cancelled parameter and use in word template edit after merge #464

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ table 9560 "Document Sharing"
DataClassification = SystemMetadata;
InitValue = Ask;
}

/// <summary>
/// Specifies whether the action was cancelled.
/// </summary>
field(13; Cancelled; Boolean)
{
DataClassification = SystemMetadata;
InitValue = false;
stkillen marked this conversation as resolved.
Show resolved Hide resolved
}
}

keys
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ codeunit 9561 "Document Sharing Impl."
Handled := false;
Sleep(2000); // This sleep is to ensure the OneDrive clears the lock on the file after the user saves and closes.
DocumentSharingCodeunit.OnGetFileContents(DocumentSharing, Handled);
end;
end else
DocumentSharing.Cancelled := true;
stkillen marked this conversation as resolved.
Show resolved Hide resolved

Handled := false;
DocumentSharingCodeunit.OnDeleteDocument(DocumentSharing, Handled);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,10 @@ codeunit 9988 "Word Template Impl."
TempDocumentSharing.Insert();

DocumentSharing.Share(TempDocumentSharing);

if TempDocumentSharing.Cancelled then
Error('');

ResultTempBlob.CreateOutStream(OutStream, TextEncoding::UTF8);
TempDocumentSharing.Data.CreateInStream(InStream, TextEncoding::UTF8);
CopyStream(OutStream, InStream);
Expand Down
Loading