-
Notifications
You must be signed in to change notification settings - Fork 694
Uptake/approval apis #29778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
BenPlunk
wants to merge
10
commits into
microsoft:main
Choose a base branch
from
BenPlunk:uptake/approval-apis
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Uptake/approval apis #29778
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5237c13
Added new Approval APIs and Tests
BenPlunk efacf7c
Merged PR 41108: Added new Approval APIs and Tests
BenPlunk e1f2396
Merged PR 41108: Added new Approval APIs and Tests
BenPlunk 07ea16a
Update Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al
BenPlunk ac36de0
Apply suggestions from code review
BenPlunk 598bff9
Fix abbreviated field names
BenPlunk 3a1065f
Fix field name
BenPlunk 92036f9
Merge branch 'uptake/approval-apis' of https://dev.azure.com/fenwick/…
BenPlunk b6cbb52
Fix field names
BenPlunk 9c484d1
More field name updates
BenPlunk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
158 changes: 158 additions & 0 deletions
158
Apps/W1/APIV2/app/src/pages/APIV2ApprovalEntries.Page.al
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. microsoft/auditing is a new API path, why 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(salespersonPurchaserCode; Rec."Salespers./Purch. Code") | ||
| { | ||
| Caption = 'Salesperson/Purchaser Code'; | ||
| } | ||
| field(salespersonPurchaserName; Rec."Salespers./Purch. Name") | ||
| { | ||
| Caption = 'Salesperson/Purchaser 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'; | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
108 changes: 108 additions & 0 deletions
108
Apps/W1/APIV2/app/src/pages/APIV2ApprovalUserSetup.Page.al
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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; | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If these are going to be a separate group, then they shouldn't be in APIV2 app. Instead they should get their own app.