Page extension 6306 Sust. Service Order Stats.
src/Apps/W1/Sustainability/app/src/Service/SustServiceOrderStats.PageExt.al59 lines, Copyright (c) Microsoft Corporation. MIT
// ------------------------------------------------------------------------------------------------// Copyright (c) Microsoft Corporation. All rights reserved.// Licensed under the MIT License. See License.txt in the project root for license information.// ------------------------------------------------------------------------------------------------namespace Microsoft.Sustainability.Service;using Microsoft.Service.Document;pageextension 6306 "Sust. Service Order Stats." extends "Service Order Statistics"{ layout { addafter(Customer) { group(Sustainability) { Visible = EnableSustainability; Caption = 'Sustainability'; field("Total CO2e"; Rec."Total CO2e") { ApplicationArea = Basic, Suite; Caption = 'Total CO2e'; ToolTip = 'Specifies the Total CO2e for Purchase Order'; } field("Posted Total CO2e"; Rec."Posted Total CO2e") { ApplicationArea = Basic, Suite; Caption = 'Posted Total CO2e'; ToolTip = 'Specifies the Posted Total CO2e for Purchase Order'; } } } } trigger OnOpenPage() begin EnableSustainabilityControl(); end; trigger OnAfterGetCurrRecord() begin EnableSustainabilityControl(); end; trigger OnAfterGetRecord() begin EnableSustainabilityControl(); end; local procedure EnableSustainabilityControl() begin Rec.CalcFields("Sustainability Lines Exist"); EnableSustainability := Rec."Sustainability Lines Exist"; end; var EnableSustainability: Boolean;}