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 @@ -7,7 +7,9 @@ namespace Microsoft.eServices.EDocument;

using Microsoft.eServices.EDocument.IO.Peppol;
using Microsoft.EServices.EDocument.OrderMatch;
#if not CLEAN29
using Microsoft.eServices.EDocument.OrderMatch.Copilot;
#endif
using Microsoft.eServices.EDocument.Processing.Import;
using Microsoft.eServices.EDocument.Processing.Import.Purchase;
using Microsoft.EServices.EDocument.Processing.Import.Sales;
Expand Down Expand Up @@ -39,7 +41,9 @@ permissionset 6102 "E-Doc. Core - Edit"
tabledata "E-Doc. Order Match" = IMD,
tabledata "Service Participant" = IMD,
tabledata "E-Doc. Import Parameters" = IMD,
#if not CLEAN29
tabledata "E-Doc. PO Match Prop. Buffer" = IMD,
#endif
tabledata "E-Document Header Mapping" = IMD,
tabledata "E-Document Line Mapping" = IMD,
tabledata "E-Document Purchase Header" = IMD,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ using Microsoft.eServices.EDocument.Integration.Send;
using Microsoft.eServices.EDocument.IO;
using Microsoft.eServices.EDocument.IO.Peppol;
using Microsoft.EServices.EDocument.OrderMatch;
#if not CLEAN29
using Microsoft.EServices.EDocument.OrderMatch.Copilot;
#endif
using Microsoft.eServices.EDocument.Processing.Import;
using Microsoft.eServices.EDocument.Processing.Import.Purchase;
using Microsoft.EServices.EDocument.Processing.Import.Sales;
Expand All @@ -37,7 +39,9 @@ permissionset 6100 "E-Doc. Core - Objects"
table "E-Doc. Service Supported Type" = X,
table "E-Doc. Order Match" = X,
table "E-Doc. Imported Line" = X,
#if not CLEAN29
table "E-Doc. PO Match Prop. Buffer" = X,
#endif
table "Service Participant" = X,
table "E-Doc. Import Parameters" = X,
table "E-Document Header Mapping" = X,
Expand Down Expand Up @@ -91,8 +95,10 @@ permissionset 6100 "E-Doc. Core - Objects"
codeunit "Pre-Map Service Inv. Line" = X,
codeunit "EDoc PEPPOL BIS 3.0" = X,
codeunit "E-Doc. Line Matching" = X,
#if not CLEAN29
codeunit "E-Doc. PO AOAI Function" = X,
codeunit "E-Doc. PO Copilot Matching" = X,
#endif
codeunit "E-Doc. Attachment Processor" = X,
codeunit "Service Participant" = X,
page "E-Doc. Changes Part" = X,
Expand All @@ -114,8 +120,10 @@ permissionset 6100 "E-Doc. Core - Objects"
page "E-Doc. Purchase Order Sub" = X,
page "E-Doc. Order Map. Activities" = X,
page "E-Doc Service Supported Types" = X,
#if not CLEAN29
page "E-Doc. PO Copilot Prop" = X,
page "E-Doc. PO Match Prop. Sub" = X,
#endif
page "E-Doc. Order Match Act." = X,
page "E-Doc. Select PO Lines" = X,
page "E-Doc. Select Receipt Lines" = X,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ namespace Microsoft.eServices.EDocument;

using Microsoft.eServices.EDocument.IO.Peppol;
using Microsoft.EServices.EDocument.OrderMatch;
#if not CLEAN29
using Microsoft.eServices.EDocument.OrderMatch.Copilot;
#endif
using Microsoft.eServices.EDocument.Processing;
using Microsoft.eServices.EDocument.Processing.Import;
using Microsoft.eServices.EDocument.Processing.Import.Purchase;
Expand Down Expand Up @@ -35,7 +37,9 @@ permissionset 6101 "E-Doc. Core - Read"
#endregion Logging
tabledata "E-Doc. Imported Line" = R,
tabledata "E-Doc. Order Match" = R,
#if not CLEAN29
tabledata "E-Doc. PO Match Prop. Buffer" = R,
#endif
#region Service
tabledata "E-Document Service" = R,
tabledata "E-Doc. Service Data Exch. Def." = R,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ namespace Microsoft.eServices.EDocument;

using Microsoft.eServices.EDocument.IO.Peppol;
using Microsoft.eServices.EDocument.OrderMatch;
#if not CLEAN29
using Microsoft.eServices.EDocument.OrderMatch.Copilot;
#endif
using Microsoft.eServices.EDocument.Processing;
using Microsoft.eServices.EDocument.Processing.Import;
using Microsoft.eServices.EDocument.Processing.Import.Purchase;
Expand Down Expand Up @@ -41,7 +43,9 @@ permissionset 6105 "E-Doc. Core - User"
#endregion Logging
tabledata "E-Doc. Imported Line" = IMD,
tabledata "E-Doc. Order Match" = IMD,
#if not CLEAN29
tabledata "E-Doc. PO Match Prop. Buffer" = IMD,
#endif
tabledata "Service Participant" = IMD,
#region Purchase draft
tabledata "E-Doc. Import Parameters" = IMD,
Expand Down
8 changes: 8 additions & 0 deletions src/Apps/W1/EDocument/App/src/Document/EDocument.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ using Microsoft.Bank.Reconciliation;
using Microsoft.eServices.EDocument.Integration.Receive;
using Microsoft.eServices.EDocument.Integration.Send;
using Microsoft.eServices.EDocument.OrderMatch;
#if not CLEAN29
using Microsoft.eServices.EDocument.OrderMatch.Copilot;
#endif
using Microsoft.eServices.EDocument.Processing.Import;
using Microsoft.eServices.EDocument.Processing.Import.Purchase;
using Microsoft.eServices.EDocument.Service;
using Microsoft.Foundation.Attachment;
#if not CLEAN29
using System.Telemetry;
#endif
using System.Utilities;

page 6121 "E-Document"
Expand Down Expand Up @@ -599,8 +603,10 @@ page 6121 "E-Document"
EDocService: Record "E-Document Service";
EDocServiceStatus2: Record "E-Document Service Status";
EDocLog: Codeunit "E-Document Log";
#if not CLEAN29
FeatureTelemetry: Codeunit "Feature Telemetry";
EDocPOCopilotMatching: Codeunit "E-Doc. PO Copilot Matching";
#endif
begin
if not IsIncomingDoc then
exit;
Expand All @@ -610,7 +616,9 @@ page 6121 "E-Document"
EDocServiceStatus2.Get(Rec."Entry No", EDocService.Code);
ShowMapToOrder := EDocServiceStatus2.Status = Enum::"E-Document Service Status"::"Order Linked";
ShowRelink := true;
#if not CLEAN29
FeatureTelemetry.LogUptake('0000MMK', EDocPOCopilotMatching.FeatureName(), Enum::"Feature Uptake Status"::Discovered);
#endif
end;
end;

Expand Down
4 changes: 4 additions & 0 deletions src/Apps/W1/EDocument/App/src/EDocumentInstall.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
// ------------------------------------------------------------------------------------------------
namespace Microsoft.eServices.EDocument.IO;

#if not CLEAN29
using Microsoft.eServices.EDocument.OrderMatch.Copilot;
#endif
using System.IO;
using System.Reflection;
using System.Upgrade;
Expand All @@ -21,12 +23,14 @@ codeunit 6161 "E-Document Install"
InsertDataExchV2();
end;

#if not CLEAN29
trigger OnInstallAppPerDatabase()
var
EDocAIMatching: Codeunit "E-Doc. PO Copilot Matching";
begin
EDocAIMatching.RegisterAICapability();
end;
#endif

internal procedure InsertDataExch()
var
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#if not CLEAN29
#pragma warning disable AA0247
codeunit 6167 "E-Doc. PO AOAI Function" implements "AOAI Function"
{
Access = Internal;
InherentPermissions = X;
InherentEntitlements = X;
ObsoleteState = Pending;
ObsoleteReason = 'The E-Document Purchase Order Matching Copilot has been deprecated.';
ObsoleteTag = '29.0';

[NonDebuggable]
procedure GetPrompt() Prompt: JsonObject
Expand Down Expand Up @@ -89,3 +93,4 @@ codeunit 6167 "E-Doc. PO AOAI Function" implements "AOAI Function"
MatchLineTxt: Label 'Matched to Purchase Order Line %1', Comment = '%1 = Number of the order line that the E-Document line is matched to';
FailedToGetPromptSecretErr: Label 'Failed to get the prompt secret from Azure Key Vault', Locked = true;
}
#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if not CLEAN29
namespace Microsoft.eServices.EDocument.OrderMatch.Copilot;

using Microsoft.eServices.EDocument;
Expand All @@ -14,6 +15,9 @@ codeunit 6163 "E-Doc. PO Copilot Matching"
Access = Internal;
InherentPermissions = X;
InherentEntitlements = X;
ObsoleteState = Pending;
ObsoleteReason = 'The E-Document Purchase Order Matching Copilot has been deprecated.';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$\textbf{🟡\ Medium\ Severity\ —\ Upgrade} \quad \color{gray}{\texttt{\small Iteration\ 2}}$

The new obsoletion metadata added across the deprecated Copilot Purchase-Order-matching objects (E-Doc.

PO AOAI Function, E-Doc. PO Copilot Matching, E-Doc. PO Copilot Prop, E-Doc. PO Match Prop. Buffer, E-Doc. PO Match Prop. Sub) all share the same ObsoleteReason: 'The E-Document Purchase Order Matching Copilot has been deprecated.' The cited guidance expects the reason to name the replacement (or explicitly state there is none) so consumers get an actionable migration path; the current text only restates that deprecation happened. Consider making the reason explicit about there being no replacement, or naming the manual/automatic matching flow as the alternative.

Knowledge:

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why

ObsoleteTag = '29.0';

var
EDocAIMatchingFunction: Codeunit "E-Doc. PO AOAI Function";
Expand Down Expand Up @@ -329,3 +333,4 @@ codeunit 6163 "E-Doc. PO Copilot Matching"
RegisterAICapability();
end;
}
#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if not CLEAN29
namespace Microsoft.eServices.EDocument.OrderMatch.Copilot;

using Microsoft.eServices.EDocument;
Expand All @@ -18,6 +19,9 @@ page 6166 "E-Doc. PO Copilot Prop"
InherentPermissions = X;
InherentEntitlements = X;
ContextSensitiveHelpPage = 'map-edocuments-with-copilot';
ObsoleteState = Pending;
ObsoleteReason = 'The E-Document Purchase Order Matching Copilot has been deprecated.';
ObsoleteTag = '29.0';

layout
{
Expand Down Expand Up @@ -331,4 +335,5 @@ page 6166 "E-Doc. PO Copilot Prop"

CurrPage.ProposalDetails.Page.Load(TempAIProposalBuffer, TempLocalEDocOrderMatches);
end;
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if not CLEAN29
namespace Microsoft.EServices.EDocument.OrderMatch.Copilot;

using Microsoft.eServices.EDocument;
Expand All @@ -13,6 +14,9 @@ table 6163 "E-Doc. PO Match Prop. Buffer"
InherentPermissions = X;
InherentEntitlements = X;
DataClassification = CustomerContent;
ObsoleteState = Pending;
ObsoleteReason = 'The E-Document Purchase Order Matching Copilot has been deprecated.';
ObsoleteTag = '29.0';

#pragma warning disable AA0473
fields
Expand Down Expand Up @@ -106,3 +110,4 @@ table 6163 "E-Doc. PO Match Prop. Buffer"
end;

}
#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if not CLEAN29
namespace Microsoft.eServices.EDocument.OrderMatch.Copilot;

using Microsoft.eServices.EDocument.OrderMatch;
Expand All @@ -15,6 +16,9 @@ page 6163 "E-Doc. PO Match Prop. Sub"
InsertAllowed = false;
InherentPermissions = X;
InherentEntitlements = X;
ObsoleteState = Pending;
ObsoleteReason = 'The E-Document Purchase Order Matching Copilot has been deprecated.';
ObsoleteTag = '29.0';

layout
{
Expand Down Expand Up @@ -119,3 +123,4 @@ page 6163 "E-Doc. PO Match Prop. Sub"
TempEDocOrderMatches.Reset();
end;
}
#endif
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
namespace Microsoft.eServices.EDocument.OrderMatch;

using Microsoft.eServices.EDocument;
#if not CLEAN29
using Microsoft.eServices.EDocument.OrderMatch.Copilot;
#endif
using Microsoft.Purchases.Document;
#if not CLEAN29
using System.AI;
using System.Telemetry;
#endif
page 6167 "E-Doc. Order Line Matching"
{
Caption = 'Purchase Order Matching';
Expand Down Expand Up @@ -165,19 +169,24 @@ page 6167 "E-Doc. Order Line Matching"
}
area(Prompting)
{
#if not CLEAN29
action(MatchCopilot)
{
Caption = 'Match with Copilot';
ToolTip = 'Match e-document lines with the assistance of Copilot';
ApplicationArea = All;
Image = SparkleFilled;
ObsoleteState = Pending;
ObsoleteReason = 'The E-Document Purchase Order Matching Copilot has been deprecated.';
ObsoleteTag = '29.0';

trigger OnAction()
begin
MatchWithCopilot(true);
SetUserInteractions();
end;
}
#endif
}
area(Navigation)
{
Expand All @@ -203,7 +212,14 @@ page 6167 "E-Doc. Order Line Matching"
}
group(Matching)
{
actionref(MatchCopilot_Promoted; MatchCopilot) { }
#if not CLEAN29
actionref(MatchCopilot_Promoted; MatchCopilot)
{
ObsoleteState = Pending;
ObsoleteReason = 'The E-Document Purchase Order Matching Copilot has been deprecated.';
ObsoleteTag = '29.0';
}
#endif
actionref(MatchManual_Promoted; MatchManual) { }
actionref(MatchAuto_Promoted; MatchAutomatic) { }
actionref(RemoveMatch_Promoted; RemoveMatch) { }
Expand All @@ -218,30 +234,38 @@ page 6167 "E-Doc. Order Line Matching"
}

var
#if not CLEAN29
FeatureTelemetry: Codeunit "Feature Telemetry";
#endif
EDocMatchOrderLines: Codeunit "E-Doc. Line Matching";
CostNotification: Notification;
AutoRunCopilot: Boolean;
LineCostVaryMatchMsg: Label 'Matched e-document lines (%1) has cost different from matched purchase order line. Please verify matches are correct.', Comment = '%1 - Line number';
#if not CLEAN29
NoMatchesFoundMsg: Label 'Copilot could not find any line matches. Please review manually';
#endif
GlobalDataCaptionExpressionTxt: Label 'Purchase Order %1', Comment = '%1 - Purchase order number';

trigger OnAfterGetRecord()
#if not CLEAN29
var
EDocOrderMatch: Record "E-Doc. Order Match";
#endif
begin
CurrPage.OrderLines.Page.SetEDocumentBeingMatched(Rec);
CurrPage.ImportedLines.Page.SetEDocumentBeingMatched(Rec);
CurrPage.OrderLines.Page.ResetQtyOnNonMatchedLines();

OpenPurchaseHeader();

#if not CLEAN29
if AutoRunCopilot then begin
AutoRunCopilot := false;
EDocOrderMatch.SetRange("E-Document Entry No.", Rec."Entry No");
if EDocOrderMatch.IsEmpty() then
MatchWithCopilot(false);
end;
#endif
end;

local procedure OpenPurchaseHeader()
Expand Down Expand Up @@ -313,6 +337,7 @@ page 6167 "E-Doc. Order Line Matching"
end;
end;

#if not CLEAN29
local procedure MatchWithCopilot(CheckToOverwrite: Boolean)
var
TempEDocImportedLines: Record "E-Doc. Imported Line" temporary;
Expand Down Expand Up @@ -342,6 +367,7 @@ page 6167 "E-Doc. Order Line Matching"

CurrPage.Update();
end;
#endif

local procedure SetUserInteractions()
begin
Expand Down
Loading
Loading