From 5237c13d1562da156a6a9b14add792f2852c3d35 Mon Sep 17 00:00:00 2001 From: "FENWICK\\ben.plunkett" <42510084+BenPlunk@users.noreply.github.com> Date: Tue, 3 Mar 2026 16:15:18 +1100 Subject: [PATCH 1/7] Added new Approval APIs and Tests --- .../src/pages/APIV2ApprovalEntries.Page.al | 158 ++++++++++++++++++ .../src/pages/APIV2ApprovalUserSetup.Page.al | 108 ++++++++++++ .../pages/APIV2PstdApprovalEntries.Page.al | 150 +++++++++++++++++ .../src/pages/APIV2WorkflowApprovers.Page.al | 97 +++++++++++ .../pages/APIV2WorkflowRespOptions.Page.al | 141 ++++++++++++++++ .../app/src/pages/APIV2WorkflowSteps.Page.al | 86 ++++++++++ .../app/src/pages/APIV2Workflows.Page.al | 66 ++++++++ .../src/APIV2ApprovalEntriesE2E.Codeunit.al | 47 ++++++ .../src/APIV2ApprovalUserSetupE2E.Codeunit.al | 42 +++++ .../APIV2PstdApprovalEntriesE2E.Codeunit.al | 63 +++++++ .../src/APIV2WorkflowApproversE2E.Codeunit.al | 67 ++++++++ .../test/src/APIV2WorkflowsE2E.Codeunit.al | 40 +++++ 12 files changed, 1065 insertions(+) create mode 100644 Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al create mode 100644 Apps/W1/APIV2/app/src/pages/APIV2ApprovalUserSetup.Page.al create mode 100644 Apps/W1/APIV2/app/src/pages/APIV2PstdApprovalEntries.Page.al create mode 100644 Apps/W1/APIV2/app/src/pages/APIV2WorkflowApprovers.Page.al create mode 100644 Apps/W1/APIV2/app/src/pages/APIV2WorkflowRespOptions.Page.al create mode 100644 Apps/W1/APIV2/app/src/pages/APIV2WorkflowSteps.Page.al create mode 100644 Apps/W1/APIV2/app/src/pages/APIV2Workflows.Page.al create mode 100644 Apps/W1/APIV2/test/src/APIV2ApprovalEntriesE2E.Codeunit.al create mode 100644 Apps/W1/APIV2/test/src/APIV2ApprovalUserSetupE2E.Codeunit.al create mode 100644 Apps/W1/APIV2/test/src/APIV2PstdApprovalEntriesE2E.Codeunit.al create mode 100644 Apps/W1/APIV2/test/src/APIV2WorkflowApproversE2E.Codeunit.al create mode 100644 Apps/W1/APIV2/test/src/APIV2WorkflowsE2E.Codeunit.al diff --git a/Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al b/Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al new file mode 100644 index 0000000000..87ec3ca255 --- /dev/null +++ b/Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al @@ -0,0 +1,158 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace System.Automation; + +page 30094 "APIV2 - Approval Entries" +{ + APIGroup = 'auditing'; + APIPublisher = 'microsoft'; + APIVersion = 'v2.0'; + EntityCaption = 'Approval Entry'; + EntitySetCaption = 'Approval Entries'; + EntityName = 'approvalEntry'; + EntitySetName = 'approvalEntries'; + Editable = false; + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + DataAccessIntent = ReadOnly; + PageType = API; + SourceTable = "Approval Entry"; + ODataKeyFields = SystemId; + + layout + { + area(Content) + { + repeater(Control1) + { + field(id; Rec.SystemId) + { + Caption = 'Id'; + } + field(entryNumber; Rec."Entry No.") + { + Caption = 'Entry No.'; + } + field(tableID; Rec."Table ID") + { + Caption = 'Table ID'; + } + field(documentType; Rec."Document Type") + { + Caption = 'Document Type'; + } + field(documentNumber; Rec."Document No.") + { + Caption = 'Document No.'; + } + field(sequenceNumber; Rec."Sequence No.") + { + Caption = 'Sequence No.'; + } + field(senderID; Rec."Sender ID") + { + Caption = 'Sender ID'; + } + field(senderName; Rec."Sender Full Name") + { + Caption = 'Sender Full Name'; + } + field(approvalCode; Rec."Approval Code") + { + Caption = 'Approval Code'; + } + field(salespersPurchCode; Rec."Salespers./Purch. Code") + { + Caption = 'Salespers./Purch. Code'; + } + field(salespersPurchName; Rec."Salespers./Purch. Name") + { + Caption = 'Salespers./Purch. Name'; + } + field(approverID; Rec."Approver ID") + { + Caption = 'Approver ID'; + } + field(approverName; Rec."Approver Full Name") + { + Caption = 'Approver Full Name'; + } + field(status; Rec.Status) + { + Caption = 'Status'; + } + field(dateTimeSentForApproval; Rec."Date-Time Sent for Approval") + { + Caption = 'Date-Time Sent for Approval'; + } + field(lastDateTimeModified; Rec."Last Date-Time Modified") + { + Caption = 'Last Date-Time Modified'; + } + field(comment; Rec.Comment) + { + Caption = 'Comment'; + } + field(dueDate; Rec."Due Date") + { + Caption = 'Due Date'; + } + field(amount; Rec.Amount) + { + Caption = 'Amount'; + } + field(amountLCY; Rec."Amount (LCY)") + { + Caption = 'Amount (LCY)'; + } + field(currencyCode; Rec."Currency Code") + { + Caption = 'Currency Code'; + } + field(approvalType; Rec."Approval Type") + { + Caption = 'Approval Type'; + } + field(limitType; Rec."Limit Type") + { + Caption = 'Limit Type'; + } + field(availableCreditLimitLCY; Rec."Available Credit Limit (LCY)") + { + Caption = 'Available Credit Limit (LCY)'; + } + field(pendingApprovals; Rec."Pending Approvals") + { + Caption = 'Pending Approvals'; + } + field(recordID; Rec."Record ID to Approve") + { + Caption = 'Record ID to Approve'; + } + field(delegationDateFormula; Rec."Delegation Date Formula") + { + Caption = 'Delegation Date Formula'; + } + field(numberOfApprovedRequests; Rec."Number of Approved Requests") + { + Caption = 'Number of Approved Requests'; + } + field(numberOfRejectedRequests; Rec."Number of Rejected Requests") + { + Caption = 'Number of Rejected Requests'; + } + field(relatedToChange; Rec."Related to Change") + { + Caption = 'Related to Change'; + } + field(workflowStepInstanceID; Rec."Workflow Step Instance ID") + { + Caption = 'Workflow Step Instance ID'; + } + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/APIV2/app/src/pages/APIV2ApprovalUserSetup.Page.al b/Apps/W1/APIV2/app/src/pages/APIV2ApprovalUserSetup.Page.al new file mode 100644 index 0000000000..c987b84d5a --- /dev/null +++ b/Apps/W1/APIV2/app/src/pages/APIV2ApprovalUserSetup.Page.al @@ -0,0 +1,108 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace System.Automation; +using System.Security.AccessControl; +using System.Security.User; + +page 30095 "APIV2 - Approval User Setup" +{ + APIGroup = 'auditing'; + APIPublisher = 'microsoft'; + APIVersion = 'v2.0'; + EntityCaption = 'Approval User Setup'; + EntitySetCaption = 'Approval User Setups'; + EntityName = 'approvalUserSetup'; + EntitySetName = 'approvalUserSetup'; + Editable = false; + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + DataAccessIntent = ReadOnly; + PageType = API; + SourceTable = "User Setup"; + ODataKeyFields = SystemId; + + layout + { + area(Content) + { + repeater(Control1) + { + field(id; Rec.SystemId) + { + Caption = 'Id'; + } + field(userId; Rec."User ID") + { + Caption = 'User ID'; + } + field(userFullName; UserFullName) + { + Caption = 'User Full Name'; + } + field(salesPersonPurchaser; Rec."Salespers./Purch. Code") + { + Caption = 'Salespers./Purch. Code'; + } + field(approverId; Rec."Approver ID") + { + Caption = 'Approver ID'; + } + field(salesAmountApprovalLimit; Rec."Sales Amount Approval Limit") + { + Caption = 'Sales Amount Approval Limit'; + } + field(unlimitedSalesApproval; Rec."Unlimited Sales Approval") + { + Caption = 'Unlimited Sales Approval'; + } + field(purchaseAmountApprovalLimit; Rec."Purchase Amount Approval Limit") + { + Caption = 'Purchase Amount Approval Limit'; + } + field(unlimitedPurchaseApproval; Rec."Unlimited Purchase Approval") + { + Caption = 'Unlimited Purchase Approval'; + } + field(requestApprovalAmountLimit; Rec."Request Amount Approval Limit") + { + Caption = 'Request Amount Approval Limit'; + } + field(unlimitedRequestApprovalAmount; Rec."Unlimited Request Approval") + { + Caption = 'Unlimited Request Approval'; + } + field(substitute; Rec.Substitute) + { + Caption = 'Substitute'; + } + field(eMail; Rec."E-Mail") + { + Caption = 'E-Mail'; + } + field(phoneNumber; Rec."Phone No.") + { + Caption = 'Phone No.'; + } + field(approvalAdmin; Rec."Approval Administrator") + { + Caption = 'Approval Administrator'; + } + } + } + } + + var + UserFullName: Text; + + trigger OnAfterGetRecord() + var + User: Record User; + begin + User.SetRange("User Name", Rec."User ID"); + if User.FindFirst() then + UserFullName := User."Full Name"; + end; +} \ No newline at end of file diff --git a/Apps/W1/APIV2/app/src/pages/APIV2PstdApprovalEntries.Page.al b/Apps/W1/APIV2/app/src/pages/APIV2PstdApprovalEntries.Page.al new file mode 100644 index 0000000000..ec31eaa609 --- /dev/null +++ b/Apps/W1/APIV2/app/src/pages/APIV2PstdApprovalEntries.Page.al @@ -0,0 +1,150 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace System.Automation; + +page 30093 "APIV2 - Pstd. Approval Entries" +{ + APIGroup = 'auditing'; + APIPublisher = 'microsoft'; + APIVersion = 'v2.0'; + EntityCaption = 'Posted Approval Entry'; + EntitySetCaption = 'Posted Approval Entries'; + EntityName = 'postedApprovalEntry'; + EntitySetName = 'postedApprovalEntries'; + Editable = false; + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + DataAccessIntent = ReadOnly; + PageType = API; + SourceTable = "Posted Approval Entry"; + ODataKeyFields = SystemId; + + layout + { + area(Content) + { + repeater(Control1) + { + field(id; Rec.SystemId) + { + Caption = 'Id'; + } + field(entryNumber; Rec."Entry No.") + { + Caption = 'Entry No.'; + } + field(tableID; Rec."Table ID") + { + Caption = 'Table ID'; + } + field(documentNumber; Rec."Document No.") + { + Caption = 'Document No.'; + } + field(sequenceNumber; Rec."Sequence No.") + { + Caption = 'Sequence No.'; + } + field(senderID; Rec."Sender ID") + { + Caption = 'Sender ID'; + } + field(senderName; Rec."Sender Full Name") + { + Caption = 'Sender Full Name'; + } + field(approvalCode; Rec."Approval Code") + { + Caption = 'Approval Code'; + } + field(salespersPurchCode; Rec."Salespers./Purch. Code") + { + Caption = 'Salespers./Purch. Code'; + } + field(salespersPurchName; Rec."Salespers./Purch. Name") + { + Caption = 'Salespers./Purch. Name'; + } + field(approverID; Rec."Approver ID") + { + Caption = 'Approver ID'; + } + field(approverName; Rec."Approver Full Name") + { + Caption = 'Approver Full Name'; + } + field(status; Rec.Status) + { + Caption = 'Status'; + } + field(dateTimeSentForApproval; Rec."Date-Time Sent for Approval") + { + Caption = 'Date-Time Sent for Approval'; + } + field(lastDateTimeModified; Rec."Last Date-Time Modified") + { + Caption = 'Last Date-Time Modified'; + } + field(lastModifiedByID; Rec."Last Modified By ID") + { + Caption = 'Last Modified By ID'; + } + field(comment; Rec.Comment) + { + Caption = 'Comment'; + } + field(dueDate; Rec."Due Date") + { + Caption = 'Due Date'; + } + field(amount; Rec.Amount) + { + Caption = 'Amount'; + } + field(amountLCY; Rec."Amount (LCY)") + { + Caption = 'Amount (LCY)'; + } + field(currencyCode; Rec."Currency Code") + { + Caption = 'Currency Code'; + } + field(approvalType; Rec."Approval Type") + { + Caption = 'Approval Type'; + } + field(limitType; Rec."Limit Type") + { + Caption = 'Limit Type'; + } + field(availableCreditLimitLCY; Rec."Available Credit Limit (LCY)") + { + Caption = 'Available Credit Limit (LCY)'; + } + field(recordID; Rec."Posted Record ID") + { + Caption = 'Posted Record ID'; + } + field(delegationDateFormula; Rec."Delegation Date Formula") + { + Caption = 'Delegation Date Formula'; + } + field(numberOfApprovedRequests; Rec."Number of Approved Requests") + { + Caption = 'Number of Approved Requests'; + } + field(numberOfRejectedRequests; Rec."Number of Rejected Requests") + { + Caption = 'Number of Rejected Requests'; + } + field(iterationNumber; Rec."Iteration No.") + { + Caption = 'Iteration No.'; + } + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/APIV2/app/src/pages/APIV2WorkflowApprovers.Page.al b/Apps/W1/APIV2/app/src/pages/APIV2WorkflowApprovers.Page.al new file mode 100644 index 0000000000..c314d72f84 --- /dev/null +++ b/Apps/W1/APIV2/app/src/pages/APIV2WorkflowApprovers.Page.al @@ -0,0 +1,97 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace System.Automation; + +page 2148 "APIV2 - Workflow Approvers" +{ + APIGroup = 'auditing'; + APIPublisher = 'microsoft'; + APIVersion = 'v2.0'; + ApplicationArea = All; + EntityCaption = 'Workflow Approver'; + EntitySetCaption = 'Workflow Approvers'; + EntityName = 'workflowApprover'; + EntitySetName = 'workflowApprovers'; + Editable = false; + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + DataAccessIntent = ReadOnly; + PageType = API; + SourceTable = "Workflow Approvers Buffer"; + SourceTableTemporary = true; + ODataKeyFields = SystemId; + + layout + { + area(Content) + { + repeater(Control1) + { + field(id; Rec.SystemId) + { + Caption = 'Id'; + } + field(workflowCode; Rec.WorkflowCode) + { + Caption = 'Workflow Code'; + } + field(workflowDescription; Rec.WorkflowDescription) + { + Caption = 'Workflow Description'; + } + field(category; Rec.Category) + { + Caption = 'Category'; + } + field(enabled; Rec.Enabled) + { + Caption = 'Enabled'; + } + field(workflowStepId; Rec.WorkflowStepId) + { + Caption = 'Workflow Step Id'; + } + field(argumentId; Rec.ArgumentId) + { + Caption = 'Argument Id'; + } + field(approverType; Rec.ApproverType) + { + Caption = 'Approver Type'; + } + field(approverLimitType; Rec.ApproverLimitType) + { + Caption = 'Approver Limit Type'; + } + field(userGroupCode; Rec.UserGroupCode) + { + Caption = 'User Group Code'; + } + field(userGroupDescription; Rec.UserGroupDescription) + { + Caption = 'User Group Description'; + } + field(userId; Rec.UserId) + { + Caption = 'User Id'; + } + field(userName; Rec.UserName) + { + Caption = 'User Name'; + } + field(sequence; Rec.Sequence) + { + Caption = 'Sequence'; + } + } + } + } + + trigger OnInit() + begin + Rec.FillBuffer(); + end; +} \ No newline at end of file diff --git a/Apps/W1/APIV2/app/src/pages/APIV2WorkflowRespOptions.Page.al b/Apps/W1/APIV2/app/src/pages/APIV2WorkflowRespOptions.Page.al new file mode 100644 index 0000000000..9c2d7ce79c --- /dev/null +++ b/Apps/W1/APIV2/app/src/pages/APIV2WorkflowRespOptions.Page.al @@ -0,0 +1,141 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace System.Automation; + +page 2146 "APIV2 - Workflow Resp. Options" +{ + APIGroup = 'auditing'; + APIPublisher = 'microsoft'; + APIVersion = 'v2.0'; + EntityCaption = 'Workflow Response Option'; + EntitySetCaption = 'Workflow Response Options'; + EntityName = 'workflowResponseOption'; + EntitySetName = 'workflowResponseOptions'; + Editable = false; + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + DataAccessIntent = ReadOnly; + PageType = API; + SourceTable = "Workflow step argument"; + ODataKeyFields = SystemId; + layout + { + area(Content) + { + repeater(Control1) + { + field(systemId; Rec.SystemId) + { + Caption = 'System Id'; + } + field(id; Rec.ID) + { + Caption = 'ID'; + } + field(type; Rec."Type") + { + Caption = 'Type'; + } + field(generalJournalTemplateName; Rec."General Journal Template Name") + { + Caption = 'General Journal Template Name'; + } + field(generalJournalBatchName; Rec."General Journal Batch Name") + { + Caption = 'General Journal Batch Name'; + } + field(notificationUserID; Rec."Notification User ID") + { + Caption = 'Notification User ID'; + } + field(notificationUserLicenseType; Rec."Notification User License Type") + { + Caption = 'Notification User License Type'; + } + field(responseFunctionName; Rec."Response Function Name") + { + Caption = 'Response Function Name'; + } + field(notifySender; Rec."Notify Sender") + { + Caption = 'Notify Sender'; + } + field(linkTargetPage; Rec."Link Target Page") + { + Caption = 'Link Target Page'; + } + field(customLink; Rec."Custom Link") + { + Caption = 'Custom Link'; + } + field(eventConditions; Rec."Event Conditions") + { + Caption = 'Event Conditions'; + } + field(approverType; Rec."Approver Type") + { + Caption = 'Approver Type'; + } + field(approverLimitType; Rec."Approver Limit Type") + { + Caption = 'Approver Limit Type'; + } + field(workflowUserGroupCode; Rec."Workflow User Group Code") + { + Caption = 'Workflow User Group Code'; + } + field(dueDateFormula; Rec."Due Date Formula") + { + Caption = 'Due Date Formula'; + } + field(message; Rec.Message) + { + Caption = 'Message'; + } + field(delegateAfter; Rec."Delegate After") + { + Caption = 'Delegate After'; + } + field(showConfirmationMessage; Rec."Show Confirmation Message") + { + Caption = 'Show Confirmation Message'; + } + field(tableNumber; Rec."Table No.") + { + Caption = 'Table No.'; + } + field(fieldNumber; Rec."Field No.") + { + Caption = 'Field No.'; + } + field(fieldCaption; Rec."Field Caption") + { + Caption = 'Field Caption'; + } + field(approverUserID; Rec."Approver User ID") + { + Caption = 'Approver User ID'; + } + field(responseType; Rec."Response Type") + { + Caption = 'Response Type'; + } + field(responseUserID; Rec."Response User ID") + { + Caption = 'Response User ID'; + } + field(notificationEntryType; Rec."Notification Entry Type") + { + Caption = 'Notification Entry Type'; + } + field(responseOptionGroup; Rec."Response Option Group") + { + Caption = 'Response Option Group'; + } + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/APIV2/app/src/pages/APIV2WorkflowSteps.Page.al b/Apps/W1/APIV2/app/src/pages/APIV2WorkflowSteps.Page.al new file mode 100644 index 0000000000..9b27a61551 --- /dev/null +++ b/Apps/W1/APIV2/app/src/pages/APIV2WorkflowSteps.Page.al @@ -0,0 +1,86 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace System.Automation; + +page 2147 "APIV2 - Workflow Steps" +{ + APIGroup = 'auditing'; + APIPublisher = 'microsoft'; + APIVersion = 'v2.0'; + EntityCaption = 'Workflow Step'; + EntitySetCaption = 'Workflow Steps'; + EntityName = 'workflowStep'; + EntitySetName = 'workflowSteps'; + Editable = false; + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + DataAccessIntent = ReadOnly; + PageType = API; + SourceTable = "Workflow Step"; + ODataKeyFields = SystemId; + + layout + { + area(Content) + { + repeater(Control1) + { + field(systemId; Rec.SystemId) + { + Caption = 'System Id'; + } + field(id; Rec.ID) + { + Caption = 'ID'; + } + field(workflowCode; Rec."Workflow Code") + { + Caption = 'Workflow Code'; + } + field(description; Rec.Description) + { + Caption = 'Description'; + } + field(entryPoint; Rec."Entry Point") + { + Caption = 'Entry Point'; + } + field(previousWorkflowStepID; Rec."Previous Workflow Step ID") + { + Caption = 'Previous Workflow Step ID'; + } + field(nextWorkflowStepID; Rec."Next Workflow Step ID") + { + Caption = 'Next Workflow Step ID'; + } + field(type; Rec.Type) + { + Caption = 'Type'; + } + field(functionName; Rec."Function Name") + { + Caption = 'Function Name'; + } + field(argument; Rec.Argument) + { + Caption = 'Argument'; + } + field(sequenceNo; Rec."Sequence No.") + { + Caption = 'Sequence No.'; + } + part(workflowResponseOptions; "APIV2 - Workflow Resp. Options") + { + Caption = 'Workflow Response Options'; + EntityName = 'workflowResponseOption'; + EntitySetName = 'workflowResponseOptions'; + Multiplicity = Many; + SubPageLink = ID = field(Argument); + } + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/APIV2/app/src/pages/APIV2Workflows.Page.al b/Apps/W1/APIV2/app/src/pages/APIV2Workflows.Page.al new file mode 100644 index 0000000000..e54b10107f --- /dev/null +++ b/Apps/W1/APIV2/app/src/pages/APIV2Workflows.Page.al @@ -0,0 +1,66 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace System.Automation; + +page 2145 "APIV2 - Workflows" +{ + APIGroup = 'auditing'; + APIPublisher = 'microsoft'; + APIVersion = 'v2.0'; + EntityCaption = 'Workflow'; + EntitySetCaption = 'Workflows'; + EntityName = 'workflow'; + EntitySetName = 'workflows'; + Editable = false; + DeleteAllowed = false; + InsertAllowed = false; + ModifyAllowed = false; + DataAccessIntent = ReadOnly; + PageType = API; + SourceTable = Workflow; + ODataKeyFields = SystemId; + + layout + { + area(Content) + { + repeater(Control1) + { + field(id; Rec.SystemId) + { + Caption = 'Id'; + } + field(code; Rec.Code) + { + Caption = 'Code'; + } + field(description; Rec.Description) + { + Caption = 'Description'; + } + field(enabled; Rec.Enabled) + { + Caption = 'Enabled'; + } + field(template; Rec.Template) + { + Caption = 'Template'; + } + field(category; Rec.Category) + { + Caption = 'Category'; + } + part(workflowSteps; "APIV2 - Workflow Steps") + { + Caption = 'Workflow Steps'; + EntityName = 'workflowStep'; + EntitySetName = 'workflowSteps'; + Multiplicity = Many; + SubPageLink = "Workflow Code" = field(Code); + } + } + } + } +} \ No newline at end of file diff --git a/Apps/W1/APIV2/test/src/APIV2ApprovalEntriesE2E.Codeunit.al b/Apps/W1/APIV2/test/src/APIV2ApprovalEntriesE2E.Codeunit.al new file mode 100644 index 0000000000..784660420d --- /dev/null +++ b/Apps/W1/APIV2/test/src/APIV2ApprovalEntriesE2E.Codeunit.al @@ -0,0 +1,47 @@ +codeunit 139910 "APIV2 - Approval Entries E2E" +{ + + Subtype = Test; + TestType = IntegrationTest; + TestPermissions = Disabled; + + var + Assert: Codeunit Assert; + LibraryApproval: Codeunit "Library - Document Approvals"; + LibrarySales: Codeunit "Library - Sales"; + LibraryGraphMgt: Codeunit "Library - Graph Mgt"; + ServiceNameTxt: Label 'approvalEntries'; + + + [Test] + procedure TestGetApprovalEntries() + var + ApprovalEntry: Record "Approval Entry"; + SalesHeader: Record "Sales Header"; + ApprovalEntryId: Text; + TargetURL: Text; + ResponseText: Text; + begin + // [SCENARIO] Check that approval entries can be retrieved via API + + // [GIVEN] a Sales order exists + LibrarySales.CreateSalesOrder(SalesHeader); + + // [GIVEN] the sales order has an approval entry + LibraryApproval.CreateApprovalEntryBasic(ApprovalEntry, Database::"Sales Header", Enum::"Approval Document Type"::Order, SalesHeader."No.", Enum::"Approval Status"::Open, Enum::"Workflow Approval Limit Type"::"Approval Limits", SalesHeader.RecordId(), Enum::"Workflow Approval Type"::Approver, Today(), SalesHeader.Amount); + ApprovalEntryId := Format(ApprovalEntry.SystemId); + + Commit(); + + // [WHEN] we GET the entry from the web service + ClearLastError(); + TargetURL := LibraryGraphMgt.CreateTargetURL(ApprovalEntryId, Page::"APIV2 - Approval Entries", ServiceNameTxt); + LibraryGraphMgt.GetFromWebService(ResponseText, TargetURL); + + // [THEN] entry should exist in the response + if GetLastErrorText() <> '' then + Assert.ExpectedError('Request failed with error: ' + GetLastErrorText()); + + Assert.IsTrue(LibraryGraphMgt.GetObjectIDFromJSON(ResponseText, 'id', ApprovalEntryId), 'Could not find approval entry'); + end; +} \ No newline at end of file diff --git a/Apps/W1/APIV2/test/src/APIV2ApprovalUserSetupE2E.Codeunit.al b/Apps/W1/APIV2/test/src/APIV2ApprovalUserSetupE2E.Codeunit.al new file mode 100644 index 0000000000..0bcde0b3cb --- /dev/null +++ b/Apps/W1/APIV2/test/src/APIV2ApprovalUserSetupE2E.Codeunit.al @@ -0,0 +1,42 @@ +codeunit 139912 "APIV2 - Approval UserSetup E2E" +{ + + Subtype = Test; + TestType = IntegrationTest; + TestPermissions = Disabled; + + var + Assert: Codeunit Assert; + LibraryApproval: Codeunit "Library - Document Approvals"; + LibraryGraphMgt: Codeunit "Library - Graph Mgt"; + ServiceNameTxt: Label 'approvalUserSetup'; + + + [Test] + procedure TestGetApprovalUserSetup() + var + UserSetup: Record "User Setup"; + UserSetupId: Text; + TargetURL: Text; + ResponseText: Text; + begin + // [SCENARIO] Check that approval user setup can be retrieved via API + + // [GIVEN] an Approval User Setup exists + LibraryApproval.CreateMockupUserSetup(UserSetup); + UserSetupId := Format(UserSetup.SystemId); + + Commit(); + + // [WHEN] we GET the entry from the web service + ClearLastError(); + TargetURL := LibraryGraphMgt.CreateTargetURL(UserSetupId, Page::"APIV2 - Approval User Setup", ServiceNameTxt); + LibraryGraphMgt.GetFromWebService(ResponseText, TargetURL); + + // [THEN] entry should exist in the response + if GetLastErrorText() <> '' then + Assert.ExpectedError('Request failed with error: ' + GetLastErrorText()); + + Assert.IsTrue(LibraryGraphMgt.GetObjectIDFromJSON(ResponseText, 'id', UserSetupId), 'Could not find approval user setup'); + end; +} \ No newline at end of file diff --git a/Apps/W1/APIV2/test/src/APIV2PstdApprovalEntriesE2E.Codeunit.al b/Apps/W1/APIV2/test/src/APIV2PstdApprovalEntriesE2E.Codeunit.al new file mode 100644 index 0000000000..f1cab97f94 --- /dev/null +++ b/Apps/W1/APIV2/test/src/APIV2PstdApprovalEntriesE2E.Codeunit.al @@ -0,0 +1,63 @@ +codeunit 139911 "APIV2 PstdApprovalEntries E2E" +{ + Subtype = Test; + TestType = IntegrationTest; + TestPermissions = Disabled; + + var + Assert: Codeunit Assert; + LibrarySales: Codeunit "Library - Sales"; + LibraryGraphMgt: Codeunit "Library - Graph Mgt"; + LibraryRandom: Codeunit "Library - Random"; + ServiceNameTxt: Label 'postedApprovalEntries'; + + + [Test] + procedure TestGetPostedApprovalEntries() + var + PostedApprovalEntry: Record "Posted Approval Entry"; + SalesHeader: Record "Sales Header"; + ApprovalEntryId: Text; + TargetURL: Text; + ResponseText: Text; + begin + // [SCENARIO] Check that posted approval entries can be retrieved via API + + // [GIVEN] a Sales order exists + LibrarySales.CreateSalesOrder(SalesHeader); + + // [GIVEN] the sales order has an approved approval entry + CreatePostedApprovalEntryBasic(PostedApprovalEntry, Database::"Sales Header", SalesHeader."No.", Enum::"Approval Status"::Approved, Enum::"Workflow Approval Limit Type"::"Approval Limits", SalesHeader.RecordId(), Enum::"Workflow Approval Type"::Approver, Today(), SalesHeader.Amount); + ApprovalEntryId := Format(PostedApprovalEntry.SystemId); + + Commit(); + + // [WHEN] we GET the entry from the web service + ClearLastError(); + TargetURL := LibraryGraphMgt.CreateTargetURL(ApprovalEntryId, Page::"APIV2 - Pstd. Approval Entries", ServiceNameTxt); + LibraryGraphMgt.GetFromWebService(ResponseText, TargetURL); + + // [THEN] entry should exist in the response + if GetLastErrorText() <> '' then + Assert.ExpectedError('Request failed with error: ' + GetLastErrorText()); + + Assert.IsTrue(LibraryGraphMgt.GetObjectIDFromJSON(ResponseText, 'id', ApprovalEntryId), 'Could not find posted approval entry'); + end; + + local procedure CreatePostedApprovalEntryBasic(var PostedApprovalEntry: Record "Posted Approval Entry"; TableId: Integer; DocumentNo: Code[20]; StatusOption: Enum "Approval Status"; LimitType: Enum "Workflow Approval Limit Type"; RecID: RecordID; ApprovalType: Enum "Workflow Approval Type"; DueDate: Date; AmountDec: Decimal) + begin + PostedApprovalEntry.Init(); + PostedApprovalEntry."Table ID" := TableId; + PostedApprovalEntry."Document No." := DocumentNo; + PostedApprovalEntry."Sequence No." := LibraryRandom.RandIntInRange(10000, 100000); + PostedApprovalEntry.Status := StatusOption; + PostedApprovalEntry."Limit Type" := LimitType; + PostedApprovalEntry."Posted Record ID" := RecID; + PostedApprovalEntry."Approval Type" := ApprovalType; + PostedApprovalEntry."Due Date" := DueDate; + PostedApprovalEntry.Amount := AmountDec; + PostedApprovalEntry."Approver ID" := CopyStr(UserId(), 1, 50); + PostedApprovalEntry.Insert(); + end; + +} \ No newline at end of file diff --git a/Apps/W1/APIV2/test/src/APIV2WorkflowApproversE2E.Codeunit.al b/Apps/W1/APIV2/test/src/APIV2WorkflowApproversE2E.Codeunit.al new file mode 100644 index 0000000000..b0292c1c49 --- /dev/null +++ b/Apps/W1/APIV2/test/src/APIV2WorkflowApproversE2E.Codeunit.al @@ -0,0 +1,67 @@ +codeunit 139913 "APIV2 - Workflow Approvers E2E" +{ + + Subtype = Test; + TestType = IntegrationTest; + TestPermissions = Disabled; + + var + Assert: Codeunit Assert; + LibraryWorkflow: Codeunit "Library - Workflow"; + LibraryPermissions: Codeunit "Library - Permissions"; + LibraryGraphMgt: Codeunit "Library - Graph Mgt"; + WorkflowEventHandling: Codeunit "Workflow Event Handling"; + WorkflowResponseHandling: Codeunit "Workflow Response Handling"; + ServiceNameTxt: Label 'workflowApprovers'; + + + [Test] + procedure TestGetApprovalEntries() + var + Workflow: Record Workflow; + User: Record User; + WorkflowStep: Record "Workflow Step"; + Uri: Codeunit Uri; + UriBuilder: Codeunit "Uri Builder"; + EntryPointEventID: Integer; + ResponseID: Integer; + UserId: Text; + TargetURL: Text; + ResponseText: Text; + begin + // [SCENARIO] Check that workflow approvers can be retrieved via API + // [GIVEN] A workflow exists + LibraryWorkflow.CreateWorkflow(Workflow); + + // [GIVEN] The workflow has an approval step for a specific approver + LibraryPermissions.CreateUser(User, CreateGuid(), false); + UserId := Format(User.SystemId); + EntryPointEventID := LibraryWorkflow.InsertEntryPointEventStep(Workflow, WorkflowEventHandling.RunWorkflowOnSendSalesDocForApprovalCode()); + ResponseID := LibraryWorkflow.InsertResponseStep(Workflow, WorkflowResponseHandling.CreateApprovalRequestsCode(), EntryPointEventID); + WorkflowStep.Get(Workflow.Code, ResponseID); + LibraryWorkflow.InsertApprovalArgument(ResponseID, Enum::"Workflow Approver Type"::Approver, enum::"Workflow Approver Limit Type"::"Specific Approver", '', true); + LibraryWorkflow.UpdateWorkflowStepArgumentApproverLimitType(WorkflowStep.Argument, Enum::"Workflow Approver Type"::Approver, enum::"Workflow Approver Limit Type"::"Specific Approver", '', User."User Name"); + + Commit(); + + // [WHEN] we GET the entry from the web service + ClearLastError(); + TargetURL := LibraryGraphMgt.CreateTargetURL('', Page::"APIV2 - Workflow Approvers", ServiceNameTxt); + UriBuilder.Init(TargetURL); + UriBuilder.AddQueryParameter('$filter', 'workflowCode eq ''' + Format(Workflow.Code) + ''''); + UriBuilder.GetUri(Uri); + TargetURL := Uri.GetAbsoluteUri(); + + LibraryGraphMgt.GetFromWebService(ResponseText, TargetURL); + + // [THEN] entry should exist in the response + if GetLastErrorText() <> '' then + Assert.ExpectedError('Request failed with error: ' + GetLastErrorText()); + + Assert.IsTrue(LibraryGraphMgt.GetPropertyValueFromJSON(ResponseText, 'value', ResponseText), 'Could not find values collection in response'); + + ResponseText := LibraryGraphMgt.GetObjectFromCollectionByIndex(ResponseText, 0); + + Assert.IsTrue(LibraryGraphMgt.GetObjectIDFromJSON(ResponseText, 'userId', UserId), 'Could not find workflow approver'); + end; +} \ No newline at end of file diff --git a/Apps/W1/APIV2/test/src/APIV2WorkflowsE2E.Codeunit.al b/Apps/W1/APIV2/test/src/APIV2WorkflowsE2E.Codeunit.al new file mode 100644 index 0000000000..16ff760d18 --- /dev/null +++ b/Apps/W1/APIV2/test/src/APIV2WorkflowsE2E.Codeunit.al @@ -0,0 +1,40 @@ +codeunit 139914 "APIV2 - Workflows E2E" +{ + + Subtype = Test; + TestType = IntegrationTest; + TestPermissions = Disabled; + + var + Assert: Codeunit Assert; + LibraryWorkflow: Codeunit "Library - Workflow"; + LibraryGraphMgt: Codeunit "Library - Graph Mgt"; + ServiceNameTxt: Label 'workflows'; + + + [Test] + procedure TestGetApprovalEntries() + var + Workflow: Record Workflow; + WorkFlowId: Text; + TargetURL: Text; + ResponseText: Text; + begin + // [SCENARIO] Check that workflows can be retrieved via API + // [GIVEN] A workflow exists + LibraryWorkflow.CreateWorkflow(Workflow); + WorkFlowId := Format(Workflow.SystemId); + Commit(); + + // [WHEN] we GET the entry from the web service + ClearLastError(); + TargetURL := LibraryGraphMgt.CreateTargetURL(WorkFlowId, Page::"APIV2 - Workflows", ServiceNameTxt); + LibraryGraphMgt.GetFromWebService(ResponseText, TargetURL); + + // [THEN] entry should exist in the response + if GetLastErrorText() <> '' then + Assert.ExpectedError('Request failed with error: ' + GetLastErrorText()); + + Assert.IsTrue(LibraryGraphMgt.GetObjectIDFromJSON(ResponseText, 'id', WorkFlowId), 'Could not find workflow'); + end; +} \ No newline at end of file From 07ea16a24fac3c354d22594d7fc8a0a8d858176f Mon Sep 17 00:00:00 2001 From: Ben Plunkett <42510084+BenPlunk@users.noreply.github.com> Date: Wed, 4 Mar 2026 10:49:15 +1100 Subject: [PATCH 2/7] Update Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al Co-authored-by: Onat Buyukakkus <55088871+onbuyuka@users.noreply.github.com> --- Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al b/Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al index 87ec3ca255..2878720f4a 100644 --- a/Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al +++ b/Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al @@ -36,7 +36,7 @@ page 30094 "APIV2 - Approval Entries" { Caption = 'Entry No.'; } - field(tableID; Rec."Table ID") + field(tableId; Rec."Table ID") { Caption = 'Table ID'; } From ac36de024cac2ec4f9537a089217a7a0212a6b21 Mon Sep 17 00:00:00 2001 From: Ben Plunkett <42510084+BenPlunk@users.noreply.github.com> Date: Wed, 4 Mar 2026 10:50:24 +1100 Subject: [PATCH 3/7] Apply suggestions from code review Co-authored-by: Onat Buyukakkus <55088871+onbuyuka@users.noreply.github.com> --- Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al b/Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al index 2878720f4a..3bb0ba9361 100644 --- a/Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al +++ b/Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al @@ -52,7 +52,7 @@ page 30094 "APIV2 - Approval Entries" { Caption = 'Sequence No.'; } - field(senderID; Rec."Sender ID") + field(senderId; Rec."Sender ID") { Caption = 'Sender ID'; } @@ -66,13 +66,13 @@ page 30094 "APIV2 - Approval Entries" } field(salespersPurchCode; Rec."Salespers./Purch. Code") { - Caption = 'Salespers./Purch. Code'; + Caption = 'Salesperson/Purchaser Code'; } field(salespersPurchName; Rec."Salespers./Purch. Name") { - Caption = 'Salespers./Purch. Name'; + Caption = 'Salesperson/Purchaser Name'; } - field(approverID; Rec."Approver ID") + field(approverId; Rec."Approver ID") { Caption = 'Approver ID'; } From 598bff96b06a601d4eef841bc76fc754a9a32a3b Mon Sep 17 00:00:00 2001 From: "FENWICK\\ben.plunkett" <42510084+BenPlunk@users.noreply.github.com> Date: Wed, 4 Mar 2026 10:52:31 +1100 Subject: [PATCH 4/7] Fix abbreviated field names --- Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al b/Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al index 3bb0ba9361..fcd8318b56 100644 --- a/Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al +++ b/Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al @@ -64,11 +64,11 @@ page 30094 "APIV2 - Approval Entries" { Caption = 'Approval Code'; } - field(salespersPurchCode; Rec."Salespers./Purch. Code") + field(salespersonPurchaserCode; Rec."Salespers./Purch. Code") { Caption = 'Salesperson/Purchaser Code'; } - field(salespersPurchName; Rec."Salespers./Purch. Name") + field(salespersonPurchaserName; Rec."Salespers./Purch. Name") { Caption = 'Salesperson/Purchaser Name'; } From 3a1065f000687e0633089a33bfd1e370c180b6be Mon Sep 17 00:00:00 2001 From: "FENWICK\\ben.plunkett" <42510084+BenPlunk@users.noreply.github.com> Date: Fri, 6 Mar 2026 15:18:39 +1100 Subject: [PATCH 5/7] Fix field name --- .../W1/APIV2/app/src/pages/APIV2ApprovalUserSetup.Page.al | 2 +- .../APIV2/app/src/pages/APIV2PstdApprovalEntries.Page.al | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Apps/W1/APIV2/app/src/pages/APIV2ApprovalUserSetup.Page.al b/Apps/W1/APIV2/app/src/pages/APIV2ApprovalUserSetup.Page.al index c987b84d5a..21e01a0129 100644 --- a/Apps/W1/APIV2/app/src/pages/APIV2ApprovalUserSetup.Page.al +++ b/Apps/W1/APIV2/app/src/pages/APIV2ApprovalUserSetup.Page.al @@ -78,7 +78,7 @@ page 30095 "APIV2 - Approval User Setup" { Caption = 'Substitute'; } - field(eMail; Rec."E-Mail") + field(email; Rec."E-Mail") { Caption = 'E-Mail'; } diff --git a/Apps/W1/APIV2/app/src/pages/APIV2PstdApprovalEntries.Page.al b/Apps/W1/APIV2/app/src/pages/APIV2PstdApprovalEntries.Page.al index ec31eaa609..88fea35f66 100644 --- a/Apps/W1/APIV2/app/src/pages/APIV2PstdApprovalEntries.Page.al +++ b/Apps/W1/APIV2/app/src/pages/APIV2PstdApprovalEntries.Page.al @@ -48,9 +48,9 @@ page 30093 "APIV2 - Pstd. Approval Entries" { Caption = 'Sequence No.'; } - field(senderID; Rec."Sender ID") + field(senderId; Rec."Sender ID") { - Caption = 'Sender ID'; + Caption = 'Sender Id'; } field(senderName; Rec."Sender Full Name") { @@ -68,9 +68,9 @@ page 30093 "APIV2 - Pstd. Approval Entries" { Caption = 'Salespers./Purch. Name'; } - field(approverID; Rec."Approver ID") + field(approverId; Rec."Approver ID") { - Caption = 'Approver ID'; + Caption = 'Approver Id'; } field(approverName; Rec."Approver Full Name") { From b6cbb52e2446fea1995e5c408f7dce1f8f6db409 Mon Sep 17 00:00:00 2001 From: "FENWICK\\ben.plunkett" <42510084+BenPlunk@users.noreply.github.com> Date: Fri, 6 Mar 2026 15:20:26 +1100 Subject: [PATCH 6/7] Fix field names --- Apps/W1/APIV2/app/src/pages/APIV2PstdApprovalEntries.Page.al | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Apps/W1/APIV2/app/src/pages/APIV2PstdApprovalEntries.Page.al b/Apps/W1/APIV2/app/src/pages/APIV2PstdApprovalEntries.Page.al index 88fea35f66..f3a9e7a7ac 100644 --- a/Apps/W1/APIV2/app/src/pages/APIV2PstdApprovalEntries.Page.al +++ b/Apps/W1/APIV2/app/src/pages/APIV2PstdApprovalEntries.Page.al @@ -60,11 +60,11 @@ page 30093 "APIV2 - Pstd. Approval Entries" { Caption = 'Approval Code'; } - field(salespersPurchCode; Rec."Salespers./Purch. Code") + field(salespersonPurchCode; Rec."Salespers./Purch. Code") { Caption = 'Salespers./Purch. Code'; } - field(salespersPurchName; Rec."Salespers./Purch. Name") + field(salespersonPurchName; Rec."Salespers./Purch. Name") { Caption = 'Salespers./Purch. Name'; } From 9c484d15ba7172783eeaa9a86dd73c34ef33ce57 Mon Sep 17 00:00:00 2001 From: "FENWICK\\ben.plunkett" <42510084+BenPlunk@users.noreply.github.com> Date: Fri, 6 Mar 2026 15:25:09 +1100 Subject: [PATCH 7/7] More field name updates --- .../app/src/pages/APIV2ApprovalEntries.Page.al | 12 ++++++------ .../app/src/pages/APIV2ApprovalUserSetup.Page.al | 4 ++-- .../app/src/pages/APIV2PstdApprovalEntries.Page.al | 12 ++++++------ .../app/src/pages/APIV2WorkflowRespOptions.Page.al | 14 +++++++------- .../APIV2/app/src/pages/APIV2WorkflowSteps.Page.al | 10 +++++----- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al b/Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al index fcd8318b56..5be2d49652 100644 --- a/Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al +++ b/Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al @@ -54,7 +54,7 @@ page 30094 "APIV2 - Approval Entries" } field(senderId; Rec."Sender ID") { - Caption = 'Sender ID'; + Caption = 'Sender Id'; } field(senderName; Rec."Sender Full Name") { @@ -74,7 +74,7 @@ page 30094 "APIV2 - Approval Entries" } field(approverId; Rec."Approver ID") { - Caption = 'Approver ID'; + Caption = 'Approver Id'; } field(approverName; Rec."Approver Full Name") { @@ -128,9 +128,9 @@ page 30094 "APIV2 - Approval Entries" { Caption = 'Pending Approvals'; } - field(recordID; Rec."Record ID to Approve") + field(recordId; Rec."Record ID to Approve") { - Caption = 'Record ID to Approve'; + Caption = 'Record Id to Approve'; } field(delegationDateFormula; Rec."Delegation Date Formula") { @@ -148,9 +148,9 @@ page 30094 "APIV2 - Approval Entries" { Caption = 'Related to Change'; } - field(workflowStepInstanceID; Rec."Workflow Step Instance ID") + field(workflowStepInstanceId; Rec."Workflow Step Instance ID") { - Caption = 'Workflow Step Instance ID'; + Caption = 'Workflow Step Instance Id'; } } } diff --git a/Apps/W1/APIV2/app/src/pages/APIV2ApprovalUserSetup.Page.al b/Apps/W1/APIV2/app/src/pages/APIV2ApprovalUserSetup.Page.al index 21e01a0129..30b160d97f 100644 --- a/Apps/W1/APIV2/app/src/pages/APIV2ApprovalUserSetup.Page.al +++ b/Apps/W1/APIV2/app/src/pages/APIV2ApprovalUserSetup.Page.al @@ -36,7 +36,7 @@ page 30095 "APIV2 - Approval User Setup" } field(userId; Rec."User ID") { - Caption = 'User ID'; + Caption = 'User Id'; } field(userFullName; UserFullName) { @@ -48,7 +48,7 @@ page 30095 "APIV2 - Approval User Setup" } field(approverId; Rec."Approver ID") { - Caption = 'Approver ID'; + Caption = 'Approver Id'; } field(salesAmountApprovalLimit; Rec."Sales Amount Approval Limit") { diff --git a/Apps/W1/APIV2/app/src/pages/APIV2PstdApprovalEntries.Page.al b/Apps/W1/APIV2/app/src/pages/APIV2PstdApprovalEntries.Page.al index f3a9e7a7ac..ee6d90b4e2 100644 --- a/Apps/W1/APIV2/app/src/pages/APIV2PstdApprovalEntries.Page.al +++ b/Apps/W1/APIV2/app/src/pages/APIV2PstdApprovalEntries.Page.al @@ -36,9 +36,9 @@ page 30093 "APIV2 - Pstd. Approval Entries" { Caption = 'Entry No.'; } - field(tableID; Rec."Table ID") + field(tableId; Rec."Table ID") { - Caption = 'Table ID'; + Caption = 'Table Id'; } field(documentNumber; Rec."Document No.") { @@ -88,9 +88,9 @@ page 30093 "APIV2 - Pstd. Approval Entries" { Caption = 'Last Date-Time Modified'; } - field(lastModifiedByID; Rec."Last Modified By ID") + field(lastModifiedById; Rec."Last Modified By ID") { - Caption = 'Last Modified By ID'; + Caption = 'Last Modified By Id'; } field(comment; Rec.Comment) { @@ -124,9 +124,9 @@ page 30093 "APIV2 - Pstd. Approval Entries" { Caption = 'Available Credit Limit (LCY)'; } - field(recordID; Rec."Posted Record ID") + field(recordId; Rec."Posted Record ID") { - Caption = 'Posted Record ID'; + Caption = 'Posted Record Id'; } field(delegationDateFormula; Rec."Delegation Date Formula") { diff --git a/Apps/W1/APIV2/app/src/pages/APIV2WorkflowRespOptions.Page.al b/Apps/W1/APIV2/app/src/pages/APIV2WorkflowRespOptions.Page.al index 9c2d7ce79c..542363107a 100644 --- a/Apps/W1/APIV2/app/src/pages/APIV2WorkflowRespOptions.Page.al +++ b/Apps/W1/APIV2/app/src/pages/APIV2WorkflowRespOptions.Page.al @@ -33,7 +33,7 @@ page 2146 "APIV2 - Workflow Resp. Options" } field(id; Rec.ID) { - Caption = 'ID'; + Caption = 'Id'; } field(type; Rec."Type") { @@ -47,9 +47,9 @@ page 2146 "APIV2 - Workflow Resp. Options" { Caption = 'General Journal Batch Name'; } - field(notificationUserID; Rec."Notification User ID") + field(notificationUserId; Rec."Notification User ID") { - Caption = 'Notification User ID'; + Caption = 'Notification User Id'; } field(notificationUserLicenseType; Rec."Notification User License Type") { @@ -115,17 +115,17 @@ page 2146 "APIV2 - Workflow Resp. Options" { Caption = 'Field Caption'; } - field(approverUserID; Rec."Approver User ID") + field(approverUserId; Rec."Approver User ID") { - Caption = 'Approver User ID'; + Caption = 'Approver User Id'; } field(responseType; Rec."Response Type") { Caption = 'Response Type'; } - field(responseUserID; Rec."Response User ID") + field(responseUserId; Rec."Response User ID") { - Caption = 'Response User ID'; + Caption = 'Response User Id'; } field(notificationEntryType; Rec."Notification Entry Type") { diff --git a/Apps/W1/APIV2/app/src/pages/APIV2WorkflowSteps.Page.al b/Apps/W1/APIV2/app/src/pages/APIV2WorkflowSteps.Page.al index 9b27a61551..93030ea6cf 100644 --- a/Apps/W1/APIV2/app/src/pages/APIV2WorkflowSteps.Page.al +++ b/Apps/W1/APIV2/app/src/pages/APIV2WorkflowSteps.Page.al @@ -34,7 +34,7 @@ page 2147 "APIV2 - Workflow Steps" } field(id; Rec.ID) { - Caption = 'ID'; + Caption = 'Id'; } field(workflowCode; Rec."Workflow Code") { @@ -48,13 +48,13 @@ page 2147 "APIV2 - Workflow Steps" { Caption = 'Entry Point'; } - field(previousWorkflowStepID; Rec."Previous Workflow Step ID") + field(previousWorkflowStepId; Rec."Previous Workflow Step ID") { - Caption = 'Previous Workflow Step ID'; + Caption = 'Previous Workflow Step Id'; } - field(nextWorkflowStepID; Rec."Next Workflow Step ID") + field(nextWorkflowStepId; Rec."Next Workflow Step ID") { - Caption = 'Next Workflow Step ID'; + Caption = 'Next Workflow Step Id'; } field(type; Rec.Type) {