Skip to content

Conversation

@tuan-nguyen-fenwick
Copy link
Contributor

@tuan-nguyen-fenwick tuan-nguyen-fenwick commented Dec 17, 2025

Prerequisite

Requires PR completion: https://github.com/microsoft/BusinessCentralApps/pull/1757

Change summary

New ABC Analysis page for Inventory Power BI Report:

  • Added ABC Analysis Setup table & page
  • Added ABC Analysis API query
  • Added embedded page
  • Handled ABC Analysis Setup initialization during app installation and upgrade

Fixes AB#606229

@tuan-nguyen-fenwick tuan-nguyen-fenwick requested a review from a team as a code owner December 17, 2025 00:57
@github-actions github-actions bot added AL: Apps (W1) Add-on apps for W1 From Fork Pull request is coming from a fork labels Dec 17, 2025
@tuan-nguyen-fenwick
Copy link
Contributor Author

@mynjj Can you review this PR for Power BI Reports BC app please?

@github-actions
Copy link

Could not find linked issues in the pull request description. Please make sure the pull request description contains a line that contains 'Fixes #' followed by the issue number being fixed. Use that pattern for every issue you want to link.

@JesperSchulz JesperSchulz added the Finance GitHub request for Finance area label Dec 17, 2025
UpgradeTag.SetUpgradeTag(CloseIncomeSourceCodeUpgradeTag());
end;

local procedure InitializeABCAnalysisSetupUpgrade()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I see that the initialization does, we could do this on the fly instead of at upgrade. Let's do that, let's say when opening the main setup page, and if the setup is needed and it's not there, return default values.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for this approach.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tuan-nguyen-fenwick , what do you think about this suggestion? to initialize on the fly instead of needing to add upgrade code

var
SetupHelper: Codeunit "Power BI Report Setup";
ReportId: Guid;
ReportPageLbl: Label 'a476d6afc8d5d544193b', Locked = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this report id doesn't seem to be in yet, should we include it in this PR? I'm also fine if you want to keep it in a separate PR

@mynjj mynjj self-assigned this Dec 23, 2025
UpgradeTag.SetUpgradeTag(CloseIncomeSourceCodeUpgradeTag());
end;

local procedure InitializeABCAnalysisSetupUpgrade()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tuan-nguyen-fenwick , what do you think about this suggestion? to initialize on the fly instead of needing to add upgrade code

tabledata "PowerBI Reports Setup" = RIMD,
tabledata "Working Day" = RIMD,
tabledata "Account Category" = RM;
tabledata "Account Category" = RMID,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did we add the "ID" to account category for this functionality?

tabledata "Working Day" = RIMD,
tabledata "Account Category" = RM;
tabledata "Account Category" = RMID,
tabledata "PowerBI ABC Analysis Setup" = RMID;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very minor 😅 : it's usually RIMD (in that order)

// ------------------------------------------------------------------------------------------------
namespace Microsoft.Inventory.PowerBIReports;

page 36982 "PowerBI ABC Analysis Setup"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, you were missing to rename the file

// ------------------------------------------------------------------------------------------------
namespace Microsoft.Inventory.PowerBIReports;

table 36956 "PowerBI ABC Analysis Setup"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing to rename the file


local procedure InitializeABCAnalysisSetupUpgradeTag(): Code[250]
begin
exit('MS-TEMP-POWERBI-ABC-ANALYSIS-SETUP-20251216'); //TODO: To be confirmed with Microsoft team.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so you need workitem No. It is 606229. The code could be like this:

exit('MS-606229-PowerBIABCAnalysisSetup-20251216')

UpgradeTag.SetUpgradeTag(CloseIncomeSourceCodeUpgradeTag());
end;

local procedure InitializeABCAnalysisSetupUpgrade()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for this approach.

Copy link
Contributor

@PredragMaricic PredragMaricic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix comments above

@tuan-nguyen-fenwick
Copy link
Contributor Author

Please fix comments above

@PredragMaricic Thank you, I've updated the upgrade tag. All other comments can be resolved.

@github-actions github-actions bot added the Linked Issue is linked to a Azure Boards work item label Feb 2, 2026
@github-actions github-actions bot added this to the Version 28.0 milestone Feb 2, 2026
@tuan-nguyen-fenwick
Copy link
Contributor Author

@PredragMaricic
FYI, I have adjusted changes on this PR after migrating ABC Analysis Setup page & table to Base App in #1757

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1 Finance GitHub request for Finance area From Fork Pull request is coming from a fork Linked Issue is linked to a Azure Boards work item

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants