Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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 @@ -39,7 +39,9 @@ codeunit 4303 "Agent Task"
AgentTask: Record "Agent Task";
begin
FeatureAccessManagement.AgentTaskManagementPreviewEnabled(true);
AgentTask.Get(AgentUserSecurityId, ExternalId);
AgentTask.SetRange("Agent User Security ID", AgentUserSecurityId);
AgentTask.SetRange("External ID", ExternalId);
AgentTask.FindFirst();
exit(AgentTask);
end;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,13 @@ codeunit 4316 "Agent Task Message Builder"
/// Get the last attachment that was added to the task message.
/// </summary>
/// <returns>
/// The last attachment that was added to the task message.
/// True if any attachments exist for the task message, false otherwise.
/// </returns>
procedure GetAttachments(var TempAttachments: Record "Agent Task File" temporary)
#pragma warning disable AS0102
procedure GetAttachments(var TempAttachments: Record "Agent Task File" temporary): Boolean
begin
FeatureAccessManagement.AgentTaskManagementPreviewEnabled(true);
AgentTaskMsgBuilderImpl.GetAttachments(TempAttachments);
exit(AgentTaskMsgBuilderImpl.GetAttachments(TempAttachments));
end;
#pragma warning restore AS0102
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ codeunit 4308 "Agent Message Impl."
if AgentTaskMessage.Type <> AgentTaskMessage.Type::Output then
exit(false);

exit(AgentTaskMessage.Status = AgentTaskMessage.Status::Draft);
exit((AgentTaskMessage.Status = AgentTaskMessage.Status::Draft) or (AgentTaskMessage.Status = AgentTaskMessage.Status::" "));
end;

procedure SetStatusToSent(var AgentTaskMessage: Record "Agent Task Message")
Expand Down Expand Up @@ -132,7 +132,7 @@ codeunit 4308 "Agent Message Impl."
File.DownloadFromStream(InStream, DownloadDialogTitleLbl, '', '', FileName);
end;

procedure GetAttachments(TaskID: BigInteger; MessageID: Guid; TempAgentTaskFile: Record "Agent Task File" temporary)
procedure GetAttachments(TaskID: BigInteger; MessageID: Guid; var TempAgentTaskFile: Record "Agent Task File" temporary)
var
AgentTaskMessageAttachment: Record "Agent Task Message Attachment";
AgentTaskFile: Record "Agent Task File";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,17 @@ codeunit 4311 "Agent Task Msg. Builder Impl."
end;

[Scope('OnPrem')]
procedure GetAttachments(var TempAttachments: record "Agent Task File" temporary)
procedure GetAttachments(var TempAttachments: record "Agent Task File" temporary): Boolean
begin
TempAgentTaskFileToAttach.FindSet();
if not TempAgentTaskFileToAttach.FindSet() then
exit(false);

repeat
TempAgentTaskFileToAttach.Copy(TempAttachments);
TempAttachments.Insert();
until TempAgentTaskFileToAttach.Next() = 0;

exit(true);
end;

local procedure VerifyMandatoryFieldsSet()
Expand Down
Loading