Skip to content

Commit

Permalink
Apply suggestions from internal code review
Browse files Browse the repository at this point in the history
Should make the PR pass CI.
  • Loading branch information
JesperSchulz authored Nov 28, 2024
1 parent 4abaa75 commit 99ccfa2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
4 changes: 0 additions & 4 deletions Apps/W1/APIV2/app/src/pages/APIV2SalespersonPurchaser.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ page 30075 "APIV2 - Salesperson/Purchaser"
{
Caption = 'Blocked';
}
field(coupledToDataverse; Rec."Coupled to Dataverse")
{
Caption = 'Coupled to Dataverse';
}
field(lastModifiedDateTime; Rec.SystemModifiedAt)
{
Caption = 'Last Modified Date';
Expand Down
6 changes: 1 addition & 5 deletions Apps/W1/APIV2/test/src/APIV2SalespersonPurchE2E.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ codeunit 139882 "APIV2 - Salesperson/Purch E2E"
SalespersonPurchaser."E-Mail 2" := LibraryUtility.GenerateRandomEmail();
SalespersonPurchaser."Phone No." := LibraryUtility.GenerateRandomPhoneNo();
SalespersonPurchaser."Job Title" := LibraryUtility.GenerateRandomText(30);
SalespersonPurchaser."Commission %" := LibraryRandom.RandInt(100);
SalespersonPurchaser."Commission %" := LibraryRandom.RandDec(100, 2);
SalespersonPurchaser."Privacy Blocked" := true;
SalespersonPurchaser.Blocked := true;
SalespersonPurchaser."Coupled to Dataverse" := true;
Expand All @@ -152,7 +152,6 @@ codeunit 139882 "APIV2 - Salesperson/Purch E2E"
SalespersonPurchaserJSON := LibraryGraphMgt.AddPropertytoJSON(SalespersonPurchaserJSON, 'commisionPercent', SalespersonPurchaser."Commission %");
SalespersonPurchaserJSON := LibraryGraphMgt.AddPropertytoJSON(SalespersonPurchaserJSON, 'privacyBlocked', SalespersonPurchaser."Privacy Blocked");
SalespersonPurchaserJSON := LibraryGraphMgt.AddPropertytoJSON(SalespersonPurchaserJSON, 'blocked', SalespersonPurchaser.Blocked);
SalespersonPurchaserJSON := LibraryGraphMgt.AddPropertytoJSON(SalespersonPurchaserJSON, 'coupledToDataverse', SalespersonPurchaser."Coupled to Dataverse");
exit(SalespersonPurchaserJSON);
end;

Expand All @@ -167,8 +166,5 @@ codeunit 139882 "APIV2 - Salesperson/Purch E2E"
LibraryGraphMgt.VerifyPropertyInJSON(JSON, 'phoneNo', SalespersonPurchaser."Phone No.");
LibraryGraphMgt.VerifyPropertyInJSON(JSON, 'jobTitle', SalespersonPurchaser."Job Title");
LibraryGraphMgt.VerifyPropertyInJSON(JSON, 'commisionPercent', Format(SalespersonPurchaser."Commission %", 0, 9));
LibraryGraphMgt.VerifyPropertyInJSON(JSON, 'privacyBlocked', Format(SalespersonPurchaser."Privacy Blocked", 0, 9));
LibraryGraphMgt.VerifyPropertyInJSON(JSON, 'blocked', Format(SalespersonPurchaser.Blocked, 0, 9));
LibraryGraphMgt.VerifyPropertyInJSON(JSON, 'coupledToDataverse', Format(SalespersonPurchaser."Coupled to Dataverse", 0, 9));
end;
}

0 comments on commit 99ccfa2

Please sign in to comment.