Skip to content

Commit 5442028

Browse files
Magnus Hartvig GrønbechCopilot
andcommitted
Obsolete E-Document Purchase Order Matching Copilot
Mark the E-Document Purchase Order Matching Copilot objects as ObsoleteState = Pending (tag 29.0) and guard the objects and all their references with #if not CLEAN29 so they compile out of Clean builds. The shared "E-Document Matching Assistance" Copilot capability is left registered because it is still used by the active AI tool import flow. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 60f6f95 commit 5442028

17 files changed

Lines changed: 82 additions & 1 deletion

src/Apps/W1/EDocument/App/Permissions/EDocCoreEdit.PermissionSet.al

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ namespace Microsoft.eServices.EDocument;
77

88
using Microsoft.eServices.EDocument.IO.Peppol;
99
using Microsoft.EServices.EDocument.OrderMatch;
10+
#if not CLEAN29
1011
using Microsoft.eServices.EDocument.OrderMatch.Copilot;
12+
#endif
1113
using Microsoft.eServices.EDocument.Processing.Import;
1214
using Microsoft.eServices.EDocument.Processing.Import.Purchase;
1315
using Microsoft.EServices.EDocument.Processing.Import.Sales;
@@ -39,7 +41,9 @@ permissionset 6102 "E-Doc. Core - Edit"
3941
tabledata "E-Doc. Order Match" = IMD,
4042
tabledata "Service Participant" = IMD,
4143
tabledata "E-Doc. Import Parameters" = IMD,
44+
#if not CLEAN29
4245
tabledata "E-Doc. PO Match Prop. Buffer" = IMD,
46+
#endif
4347
tabledata "E-Document Header Mapping" = IMD,
4448
tabledata "E-Document Line Mapping" = IMD,
4549
tabledata "E-Document Purchase Header" = IMD,

src/Apps/W1/EDocument/App/Permissions/EDocCoreObjects.PermissionSet.al

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ using Microsoft.eServices.EDocument.Integration.Send;
1212
using Microsoft.eServices.EDocument.IO;
1313
using Microsoft.eServices.EDocument.IO.Peppol;
1414
using Microsoft.EServices.EDocument.OrderMatch;
15+
#if not CLEAN29
1516
using Microsoft.EServices.EDocument.OrderMatch.Copilot;
17+
#endif
1618
using Microsoft.eServices.EDocument.Processing.Import;
1719
using Microsoft.eServices.EDocument.Processing.Import.Purchase;
1820
using Microsoft.EServices.EDocument.Processing.Import.Sales;
@@ -37,7 +39,9 @@ permissionset 6100 "E-Doc. Core - Objects"
3739
table "E-Doc. Service Supported Type" = X,
3840
table "E-Doc. Order Match" = X,
3941
table "E-Doc. Imported Line" = X,
42+
#if not CLEAN29
4043
table "E-Doc. PO Match Prop. Buffer" = X,
44+
#endif
4145
table "Service Participant" = X,
4246
table "E-Doc. Import Parameters" = X,
4347
table "E-Document Header Mapping" = X,
@@ -91,8 +95,10 @@ permissionset 6100 "E-Doc. Core - Objects"
9195
codeunit "Pre-Map Service Inv. Line" = X,
9296
codeunit "EDoc PEPPOL BIS 3.0" = X,
9397
codeunit "E-Doc. Line Matching" = X,
98+
#if not CLEAN29
9499
codeunit "E-Doc. PO AOAI Function" = X,
95100
codeunit "E-Doc. PO Copilot Matching" = X,
101+
#endif
96102
codeunit "E-Doc. Attachment Processor" = X,
97103
codeunit "Service Participant" = X,
98104
page "E-Doc. Changes Part" = X,
@@ -114,8 +120,10 @@ permissionset 6100 "E-Doc. Core - Objects"
114120
page "E-Doc. Purchase Order Sub" = X,
115121
page "E-Doc. Order Map. Activities" = X,
116122
page "E-Doc Service Supported Types" = X,
123+
#if not CLEAN29
117124
page "E-Doc. PO Copilot Prop" = X,
118125
page "E-Doc. PO Match Prop. Sub" = X,
126+
#endif
119127
page "E-Doc. Order Match Act." = X,
120128
page "E-Doc. Select PO Lines" = X,
121129
page "E-Doc. Select Receipt Lines" = X,

src/Apps/W1/EDocument/App/Permissions/EDocCoreRead.PermissionSet.al

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ namespace Microsoft.eServices.EDocument;
66

77
using Microsoft.eServices.EDocument.IO.Peppol;
88
using Microsoft.EServices.EDocument.OrderMatch;
9+
#if not CLEAN29
910
using Microsoft.eServices.EDocument.OrderMatch.Copilot;
11+
#endif
1012
using Microsoft.eServices.EDocument.Processing;
1113
using Microsoft.eServices.EDocument.Processing.Import;
1214
using Microsoft.eServices.EDocument.Processing.Import.Purchase;
@@ -35,7 +37,9 @@ permissionset 6101 "E-Doc. Core - Read"
3537
#endregion Logging
3638
tabledata "E-Doc. Imported Line" = R,
3739
tabledata "E-Doc. Order Match" = R,
40+
#if not CLEAN29
3841
tabledata "E-Doc. PO Match Prop. Buffer" = R,
42+
#endif
3943
#region Service
4044
tabledata "E-Document Service" = R,
4145
tabledata "E-Doc. Service Data Exch. Def." = R,

src/Apps/W1/EDocument/App/Permissions/EDocCoreUser.PermissionSet.al

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ namespace Microsoft.eServices.EDocument;
66

77
using Microsoft.eServices.EDocument.IO.Peppol;
88
using Microsoft.eServices.EDocument.OrderMatch;
9+
#if not CLEAN29
910
using Microsoft.eServices.EDocument.OrderMatch.Copilot;
11+
#endif
1012
using Microsoft.eServices.EDocument.Processing;
1113
using Microsoft.eServices.EDocument.Processing.Import;
1214
using Microsoft.eServices.EDocument.Processing.Import.Purchase;
@@ -41,7 +43,9 @@ permissionset 6105 "E-Doc. Core - User"
4143
#endregion Logging
4244
tabledata "E-Doc. Imported Line" = IMD,
4345
tabledata "E-Doc. Order Match" = IMD,
46+
#if not CLEAN29
4447
tabledata "E-Doc. PO Match Prop. Buffer" = IMD,
48+
#endif
4549
tabledata "Service Participant" = IMD,
4650
#region Purchase draft
4751
tabledata "E-Doc. Import Parameters" = IMD,

src/Apps/W1/EDocument/App/src/Document/EDocument.Page.al

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ using Microsoft.Bank.Reconciliation;
88
using Microsoft.eServices.EDocument.Integration.Receive;
99
using Microsoft.eServices.EDocument.Integration.Send;
1010
using Microsoft.eServices.EDocument.OrderMatch;
11+
#if not CLEAN29
1112
using Microsoft.eServices.EDocument.OrderMatch.Copilot;
13+
#endif
1214
using Microsoft.eServices.EDocument.Processing.Import;
1315
using Microsoft.eServices.EDocument.Processing.Import.Purchase;
1416
using Microsoft.eServices.EDocument.Service;
@@ -599,8 +601,10 @@ page 6121 "E-Document"
599601
EDocService: Record "E-Document Service";
600602
EDocServiceStatus2: Record "E-Document Service Status";
601603
EDocLog: Codeunit "E-Document Log";
604+
#if not CLEAN29
602605
FeatureTelemetry: Codeunit "Feature Telemetry";
603606
EDocPOCopilotMatching: Codeunit "E-Doc. PO Copilot Matching";
607+
#endif
604608
begin
605609
if not IsIncomingDoc then
606610
exit;
@@ -610,7 +614,9 @@ page 6121 "E-Document"
610614
EDocServiceStatus2.Get(Rec."Entry No", EDocService.Code);
611615
ShowMapToOrder := EDocServiceStatus2.Status = Enum::"E-Document Service Status"::"Order Linked";
612616
ShowRelink := true;
617+
#if not CLEAN29
613618
FeatureTelemetry.LogUptake('0000MMK', EDocPOCopilotMatching.FeatureName(), Enum::"Feature Uptake Status"::Discovered);
619+
#endif
614620
end;
615621
end;
616622

src/Apps/W1/EDocument/App/src/EDocumentInstall.Codeunit.al

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
// ------------------------------------------------------------------------------------------------
55
namespace Microsoft.eServices.EDocument.IO;
66

7+
#if not CLEAN29
78
using Microsoft.eServices.EDocument.OrderMatch.Copilot;
9+
#endif
810
using System.IO;
911
using System.Reflection;
1012
using System.Upgrade;
@@ -21,12 +23,14 @@ codeunit 6161 "E-Document Install"
2123
InsertDataExchV2();
2224
end;
2325

26+
#if not CLEAN29
2427
trigger OnInstallAppPerDatabase()
2528
var
2629
EDocAIMatching: Codeunit "E-Doc. PO Copilot Matching";
2730
begin
2831
EDocAIMatching.RegisterAICapability();
2932
end;
33+
#endif
3034

3135
internal procedure InsertDataExch()
3236
var

src/Apps/W1/EDocument/App/src/Processing/OrderMatching/Copilot/EDocPOAOAIFunction.Codeunit.al

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
#if not CLEAN29
12
#pragma warning disable AA0247
23
codeunit 6167 "E-Doc. PO AOAI Function" implements "AOAI Function"
34
{
45
Access = Internal;
56
InherentPermissions = X;
67
InherentEntitlements = X;
8+
ObsoleteState = Pending;
9+
ObsoleteReason = 'The E-Document Purchase Order Matching Copilot has been deprecated.';
10+
ObsoleteTag = '29.0';
711

812
[NonDebuggable]
913
procedure GetPrompt() Prompt: JsonObject
@@ -89,3 +93,4 @@ codeunit 6167 "E-Doc. PO AOAI Function" implements "AOAI Function"
8993
MatchLineTxt: Label 'Matched to Purchase Order Line %1', Comment = '%1 = Number of the order line that the E-Document line is matched to';
9094
FailedToGetPromptSecretErr: Label 'Failed to get the prompt secret from Azure Key Vault', Locked = true;
9195
}
96+
#endif

src/Apps/W1/EDocument/App/src/Processing/OrderMatching/Copilot/EDocPOCopilotMatching.Codeunit.al

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if not CLEAN29
12
namespace Microsoft.eServices.EDocument.OrderMatch.Copilot;
23

34
using Microsoft.eServices.EDocument;
@@ -14,6 +15,9 @@ codeunit 6163 "E-Doc. PO Copilot Matching"
1415
Access = Internal;
1516
InherentPermissions = X;
1617
InherentEntitlements = X;
18+
ObsoleteState = Pending;
19+
ObsoleteReason = 'The E-Document Purchase Order Matching Copilot has been deprecated.';
20+
ObsoleteTag = '29.0';
1721

1822
var
1923
EDocAIMatchingFunction: Codeunit "E-Doc. PO AOAI Function";
@@ -329,3 +333,4 @@ codeunit 6163 "E-Doc. PO Copilot Matching"
329333
RegisterAICapability();
330334
end;
331335
}
336+
#endif

src/Apps/W1/EDocument/App/src/Processing/OrderMatching/Copilot/EDocPOCopilotProp.Page.al

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if not CLEAN29
12
namespace Microsoft.eServices.EDocument.OrderMatch.Copilot;
23

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

2226
layout
2327
{
@@ -331,4 +335,5 @@ page 6166 "E-Doc. PO Copilot Prop"
331335

332336
CurrPage.ProposalDetails.Page.Load(TempAIProposalBuffer, TempLocalEDocOrderMatches);
333337
end;
334-
}
338+
}
339+
#endif

src/Apps/W1/EDocument/App/src/Processing/OrderMatching/Copilot/EDocPOMatchPropBuffer.Table.al

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if not CLEAN29
12
namespace Microsoft.EServices.EDocument.OrderMatch.Copilot;
23

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

1721
#pragma warning disable AA0473
1822
fields
@@ -106,3 +110,4 @@ table 6163 "E-Doc. PO Match Prop. Buffer"
106110
end;
107111

108112
}
113+
#endif

0 commit comments

Comments
 (0)