Skip to content

Commit f05d11a

Browse files
ChethanTCopilot
andauthored
Bug 620555: [Subcontracting] Fix styling and UI text issues (#7844)
## Summary Resolves code style and UI text quality issues across the Subcontracting app, reviewed against the AL style guide and BC UI text guidelines. ### AL Style fixes (`SubcontractingManagement.Codeunit.al`, `SubcCalculateSubcontracts.Report.al`, factbox pages) - **AA0248** — Replaced two self-referencing local codeunit variables with `this.` calls in `SubcontractingManagement` - **AA0074** — Renamed `Text000`/`Text001` labels to `ProcessingWorkCentersLbl`/`ProcessingOrdersLbl` in `SubcCalculateSubcontracts` - Removed 14 empty `var` blocks from `OnDrillDown` triggers in `SubcPurchaseLineFactbox`, `SubcRoutingInfoFactbox`, `SubcTransferLineFactbox`, and `SubcontractingManagement` - Replaced `= false` boolean comparisons with `not (...)` (×2 in `SubcontractingManagement`) - Removed unnecessary parentheses around single condition in `SubcPurchProvisionWizard` - Removed double blank line inside procedure body in `SubcontractingManagement` - Unified newline escape (`\` → `\`) in duplicate `RoutingLinkUpdConfQst` label in `SubcontractingManagement` - Fixed word "depended" → "dependent" in 13 factbox field tooltips (`SubcPurchaseLineFactbox`, `SubcRoutingInfoFactbox`, `SubcTransferLineFactbox`) ### UI text fixes (pages and page extensions) - **Action tooltips — wrong voice (×6)**: Changed 3rd-person verbs to imperative in `SubcPurchOrder`, `SubcPurchOrderList`, `SubcRelProdOrder`, `SubcRelProdOrders`, `SubcProdOrderRtng`, `SubcPOSubform` - `'Prints the Dispatching List...'` → `'Print the dispatching list...'` - `'Shows Purchase Order Lines...'` → `'Show purchase order lines...'` - `'Creates the production order...'` → `'Create the production order...'` - **Action tooltips — wrong pattern (×28)**: Replaced `'Specifies the depended …'` with imperative `'View the related …'` across `SubcPOSubform`, `SubcCapLEntries`, `SubcILEntries`, `SubcTransOrderSub`, `SubcPstdDirectTransfSub`, `SubcWhseRcptLinesExt`, `SubcWhseRcptSubformExt` - **Tooltip length (×5)**: Shortened 3 tooltips in `SubcManagementSetup` and 2 in `SubcPurchProvisionWizard` from 300–410 chars to under 250 chars - **Banned terms (×4)**: Replaced `enabled`/`disabled` with `turned on`/`turned off` / `not available` in `SubcManagementSetup` and `SubcPurchProvisionWizard` - **Grammar (×2)**: Fixed `an released` → `a released` in `SubcManagementSetup` - **Trailing whitespace**: Removed spurious space before period in `SubcVendorCard` tooltip - **`&` accelerators removed**: Removed keyboard accelerator characters (`&`) from action captions and action name identifiers in `SubcSubcontractingWorksheet` and `SubcProdPlannerRoleCenter` — these are not supported in the BC web client ## Test plan - [x] Compile and publish the Subcontracting app — verify no new compiler warnings or errors - [x] Open Subcontracting Worksheet — verify action captions display correctly without `&` - [x] Open a Purchase Order with subcontracting lines — verify action group tooltips show imperative text - [x] Open a Transfer Order with subcontracting lines — verify navigation action tooltips show `View the related …` - [x] Open Subcontracting Management Setup — verify tooltips are within length limits and use `turned on`/`turned off` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Fixes [AB#620555](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/620555) --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent e92d989 commit f05d11a

23 files changed

Lines changed: 76 additions & 97 deletions

src/Apps/W1/Subcontracting/App/src/Process/Codeunits/Extensions/Manufacturing/SubcontractingManagementExt.Codeunit.al

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ codeunit 99001527 "Subcontracting Management Ext."
1515
SubcontractingManagement: Codeunit "Subcontracting Management";
1616
begin
1717
if SubContractorWorkCenterNo = '' then
18-
SubContractorWorkCenterNo := CopyStr(SubcSessionState.GetCode(SubcontractingManagement.GetDictionaryKey_Sub_CreateProdOrderProcess()), 1, 20);
18+
SubContractorWorkCenterNo := CopyStr(SubcSessionState.GetCode(SubcontractingManagement.GetKeyCreateProdOrderProcess()), 1, 20);
1919
end;
2020
}

src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcontractingManagement.Codeunit.al

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ codeunit 99001505 "Subcontracting Management"
9696
RoutingLine: Record "Routing Line";
9797
Vendor: Record Vendor;
9898
SubcSessionState: Codeunit "Subc. Session State";
99-
SubcontractingManagement: Codeunit "Subcontracting Management";
10099
RoutingLinkCode: Code[10];
101100
WorkCenterNo: Code[20];
102101
begin
@@ -105,7 +104,7 @@ codeunit 99001505 "Subcontracting Management"
105104
RoutingLinkCode := SubcManagementSetup."Rtng. Link Code Purch. Prov.";
106105

107106
Vendor.SetLoadFields("Work Center No.");
108-
if Vendor.Get(SubcSessionState.GetCode(SubcontractingManagement.GetDictionaryKey_Sub_CreateProdOrderProcess())) then
107+
if Vendor.Get(SubcSessionState.GetCode(GetKeyCreateProdOrderProcess())) then
109108
WorkCenterNo := Vendor."Work Center No.";
110109

111110
if WorkCenterNo = '' then
@@ -132,7 +131,7 @@ codeunit 99001505 "Subcontracting Management"
132131
StockkeepingUnit: Record "Stockkeeping Unit";
133132
ConfirmManagement: Codeunit "Confirm Management";
134133
PlanningGetParameters: Codeunit "Planning-Get Parameters";
135-
RoutingLinkUpdConfQst: Label 'If you change the Work Center, you will also change the default location for components with Routing Link Code=%1.\\Do you want to continue anyway?', Comment = '%1=Routing Link Code';
134+
RoutingLinkUpdConfQst: Label 'If you change the Work Center, you will also change the default location for components with Routing Link Code=%1.\Do you want to continue anyway?', Comment = '%1=Routing Link Code';
136135
SuccessfullyUpdatedMsg: Label 'Successfully updated.';
137136
UpdateIsCancelledErr: Label 'Update cancelled.';
138137
begin
@@ -164,7 +163,7 @@ codeunit 99001505 "Subcontracting Management"
164163
end;
165164
end;
166165

167-
procedure GetDictionaryKey_Sub_CreateProdOrderProcess(): Text
166+
procedure GetKeyCreateProdOrderProcess(): Text
168167
begin
169168
exit('Sub_CreateProdOrderProcess');
170169
end;
@@ -193,7 +192,6 @@ codeunit 99001505 "Subcontracting Management"
193192
end;
194193

195194
procedure HandleCommonWorkCenter(ItemJournalLine: Record "Item Journal Line"): Boolean
196-
var
197195
begin
198196
if ItemJournalLine."Work Center No." = '' then
199197
exit(false);
@@ -375,15 +373,13 @@ codeunit 99001505 "Subcontracting Management"
375373
procedure UpdateLocationCodeInProdOrderCompAfterDeleteTransferLine(var TransferLine: Record "Transfer Line")
376374
var
377375
ProdOrderComponent: Record "Prod. Order Component";
378-
SubcontractingManagement: Codeunit "Subcontracting Management";
379376
begin
380377
if ProdOrderComponent.Get("Production Order Status"::Released, TransferLine."Prod. Order No.", TransferLine."Prod. Order Line No.", TransferLine."Prod. Order Comp. Line No.") then
381378
if ProdOrderComponent."Orig. Location Code" <> '' then begin
382-
SubcontractingManagement.ChangeLocation_OnProdOrderComponent(ProdOrderComponent, '', ProdOrderComponent."Orig. Location Code", ProdOrderComponent."Orig. Bin Code");
379+
ChangeLocation_OnProdOrderComponent(ProdOrderComponent, '', ProdOrderComponent."Orig. Location Code", ProdOrderComponent."Orig. Bin Code");
383380
ProdOrderComponent."Orig. Location Code" := '';
384381
ProdOrderComponent."Orig. Bin Code" := '';
385382

386-
387383
ProdOrderComponent.Modify();
388384
end;
389385
end;
@@ -468,7 +464,7 @@ codeunit 99001505 "Subcontracting Management"
468464
Clear(Vendor);
469465

470466
VendorSubcontractingLocationCode := Vendor."Subcontr. Location Code";
471-
if ProdOrderComponent."Subcontracting Type" in ["Subcontracting Type"::InventoryByVendor, "Subcontracting Type"::Purchase] = false then
467+
if not (ProdOrderComponent."Subcontracting Type" in ["Subcontracting Type"::InventoryByVendor, "Subcontracting Type"::Purchase]) then
472468
Clear(VendorSubcontractingLocationCode);
473469
OrigLocationCode := ProdOrderComponent."Orig. Location Code";
474470
OrigBinCode := ProdOrderComponent."Orig. Bin Code";
@@ -506,7 +502,7 @@ codeunit 99001505 "Subcontracting Management"
506502
if not ConfirmManagement.GetResponseOrDefault(StrSubstNo(RoutingLinkUpdConfQst, ProdOrderRoutingLine."Routing Link Code"), true) then
507503
Error(UpdateIsCancelledErr);
508504
repeat
509-
if ProdOrderComponent."Subcontracting Type" in ["Subcontracting Type"::InventoryByVendor, "Subcontracting Type"::Purchase] = false then
505+
if not (ProdOrderComponent."Subcontracting Type" in ["Subcontracting Type"::InventoryByVendor, "Subcontracting Type"::Purchase]) then
510506
Clear(VendorSubcontractingLocationCode);
511507
OrigLocationCode := ProdOrderComponent."Orig. Location Code";
512508
OrigBinCode := ProdOrderComponent."Orig. Bin Code";

src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcProdOrderRtng.PageExt.al

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pageextension 99001503 "Subc. Prod. Order Rtng." extends "Prod. Order Routing"
3838
Image = SubcontractingWorksheet;
3939
RunObject = page "Purchase Lines";
4040
RunPageLink = "Document Type" = const(Order), "Prod. Order No." = field("Prod. Order No."), "Routing No." = field("Routing No."), "Routing Reference No." = field("Routing Reference No."), "Operation No." = field("Operation No.");
41-
ToolTip = 'Shows Purchase Order Lines for Subcontracting.';
41+
ToolTip = 'Show purchase order lines for subcontracting.';
4242
}
4343
}
4444
addlast("F&unctions")

src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcRelProdOrder.PageExt.al

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pageextension 99001504 "Subc. Rel. Prod. Order" extends "Released Production Ord
2020
Image = SubcontractingWorksheet;
2121
RunObject = page "Purchase Lines";
2222
RunPageLink = "Document Type" = const(Order), "Prod. Order No." = field("No.");
23-
ToolTip = 'Shows Purchase Order Lines for Subcontracting.';
23+
ToolTip = 'Show purchase order lines for subcontracting.';
2424
}
2525
}
2626
addafter("Item Ledger E&ntries")

src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Manufacturing/SubcRelProdOrders.PageExt.al

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pageextension 99001505 "Subc. Rel. Prod. Orders" extends "Released Production Or
1919
Image = SubcontractingWorksheet;
2020
RunObject = page "Purchase Lines";
2121
RunPageLink = "Document Type" = const(Order), "Prod. Order No." = field("No.");
22-
ToolTip = 'Shows Purchase Order Lines for Subcontracting.';
22+
ToolTip = 'Show purchase order lines for subcontracting.';
2323
}
2424
}
2525
}

src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/MasterData/SubcVendorCard.PageExt.al

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pageextension 99001516 "Subc. Vendor Card" extends "Vendor Card"
1515
field("Subcontr. Location Code"; Rec."Subcontr. Location Code")
1616
{
1717
ApplicationArea = Manufacturing;
18-
ToolTip = 'Specifies the subcontracting location where items from the vendor must be received by default after having performed an outside work .';
18+
ToolTip = 'Specifies the subcontracting location where items from the vendor must be received by default after having performed an outside work.';
1919
}
2020
field("Linked to Work Center"; Rec."Linked to Work Center")
2121
{

src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Purchase/SubcPOSubform.PageExt.al

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pageextension 99001524 "Subc. PO Subform" extends "Purchase Order Subform"
2020
ApplicationArea = Manufacturing;
2121
Caption = 'Create Production Order';
2222
Image = CreateSerialNo;
23-
ToolTip = 'Creates the production order belonging to the order for provision.';
23+
ToolTip = 'Create the production order for the current purchase order.';
2424
trigger OnAction()
2525
begin
2626
Rec.TestStatusOpen();
@@ -38,7 +38,7 @@ pageextension 99001524 "Subc. PO Subform" extends "Purchase Order Subform"
3838
ApplicationArea = Manufacturing;
3939
Caption = 'Production Order';
4040
Image = Production;
41-
ToolTip = 'Specifies the depended Production Order of this Subcontracting Purchase Order.';
41+
ToolTip = 'View the related production order.';
4242
trigger OnAction()
4343
begin
4444
ShowProductionOrder(Rec);
@@ -49,7 +49,7 @@ pageextension 99001524 "Subc. PO Subform" extends "Purchase Order Subform"
4949
ApplicationArea = Manufacturing;
5050
Caption = 'Production Order Routing';
5151
Image = Route;
52-
ToolTip = 'Specifies the depended Production Routing of this Subcontracting Purchase Order.';
52+
ToolTip = 'View the related production order routing.';
5353
trigger OnAction()
5454
begin
5555
ShowProductionOrderRouting(Rec);
@@ -60,7 +60,7 @@ pageextension 99001524 "Subc. PO Subform" extends "Purchase Order Subform"
6060
ApplicationArea = Manufacturing;
6161
Caption = 'Production Order Components';
6262
Image = Components;
63-
ToolTip = 'Specifies the depended Production Components of this Subcontracting Purchase Order.';
63+
ToolTip = 'View the related production order components.';
6464
trigger OnAction()
6565
begin
6666
ShowProductionOrderComponents(Rec);
@@ -71,7 +71,7 @@ pageextension 99001524 "Subc. PO Subform" extends "Purchase Order Subform"
7171
ApplicationArea = Manufacturing;
7272
Caption = 'Subcontracting Transfer Order';
7373
Image = TransferOrder;
74-
ToolTip = 'Specifies the depended Transfer Order of this Subcontracting Purchase Order.';
74+
ToolTip = 'View the related transfer order.';
7575
trigger OnAction()
7676
begin
7777
SubcPurchFactboxMgmt.ShowTransferOrdersAndReturnOrder(Rec, true, false);
@@ -82,7 +82,7 @@ pageextension 99001524 "Subc. PO Subform" extends "Purchase Order Subform"
8282
ApplicationArea = Manufacturing;
8383
Caption = 'Subcontracting Return Transfer Order';
8484
Image = ReturnRelated;
85-
ToolTip = 'Specifies the depended Return Transfer Order of this Subcontracting Purchase Order.';
85+
ToolTip = 'View the related return transfer order.';
8686
trigger OnAction()
8787
begin
8888
SubcPurchFactboxMgmt.ShowTransferOrdersAndReturnOrder(Rec, true, true);

src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Purchase/SubcPurchOrder.PageExt.al

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pageextension 99001523 "Subc. Purch. Order" extends "Purchase Order"
7474
ApplicationArea = Manufacturing;
7575
Caption = 'Print Subcontractor Dispatching List';
7676
Image = Print;
77-
ToolTip = 'Prints the Dispatching List for the subcontractor.';
77+
ToolTip = 'Print the dispatching list for the subcontractor.';
7878

7979
trigger OnAction()
8080
var

src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/Purchase/SubcPurchOrderList.PageExt.al

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pageextension 99001525 "Subc. PurchOrderList" extends "Purchase Order List"
6060
ApplicationArea = Manufacturing;
6161
Caption = 'Print Subcontractor Dispatching List';
6262
Image = Print;
63-
ToolTip = 'Prints the Dispatching List for the subcontractor.';
63+
ToolTip = 'Print the dispatching list for the subcontractor.';
6464

6565
trigger OnAction()
6666
var

src/Apps/W1/Subcontracting/App/src/Process/Pageextensions/SubcCapLEntries.PageExt.al

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pageextension 99001502 "Subc. CapLEntries" extends "Capacity Ledger Entries"
4545
ApplicationArea = Manufacturing;
4646
Caption = 'Subcontracting Purchase Order';
4747
Image = Order;
48-
ToolTip = 'Specifies the depended Purchase Order of this Subcontracting Transfer Order.';
48+
ToolTip = 'View the related subcontracting purchase order.';
4949
trigger OnAction()
5050
begin
5151
ShowPurchaseOrder(Rec);

0 commit comments

Comments
 (0)