Skip to content

[Subcontracting] Performance issues fix#7623

Draft
AleksandricMarko wants to merge 2 commits intomainfrom
bugs/main-623643-performance-improvements
Draft

[Subcontracting] Performance issues fix#7623
AleksandricMarko wants to merge 2 commits intomainfrom
bugs/main-623643-performance-improvements

Conversation

@AleksandricMarko
Copy link
Copy Markdown
Contributor

@AleksandricMarko AleksandricMarko commented Apr 9, 2026

Summary

Work Item(s)

Fixes AB#623643

@github-actions github-actions bot added the AL: Apps (W1) Add-on apps for W1 label Apr 9, 2026
@github-actions github-actions bot added this to the Version 29.0 milestone Apr 9, 2026
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

AL Documentation Audit

Documentation gaps were detected in the following apps:

  • Subcontracting: 10% documentation coverage

To generate documentation, run /al-docs init or /al-docs update using GitHub Copilot CLI or Claude Code.
This review is for awareness to help keep documentation in sync with code changes. It is okay to dismiss this request.

@github-actions
Copy link
Copy Markdown

⚠️ Stale Status Check Deleted

The Pull Request Build workflow run for this PR was older than 72 hours and has been deleted.

📋 Why was it deleted?

Status checks that are too old may no longer reflect the current state of the target branch. To ensure this PR is validated against the latest code and passes up-to-date checks, a fresh build is required.


🔄 How to trigger a new status check:

  1. 📤 Push a new commit to the PR branch, or
  2. 🔁 Close and reopen the PR

This will automatically trigger a new Pull Request Build workflow run.

ChethanT
ChethanT previously approved these changes Apr 15, 2026
@AleksandricMarko
Copy link
Copy Markdown
Contributor Author

AleksandricMarko commented Apr 15, 2026

Hello @SPinkow @stevengrossGOB
Could you please review this PR
Seems like there was a bug with if ItemLedgerEntry.IsEmpty() then (should be if ItemLedgerEntry2.IsEmpty() then)
Also, in 2 procedures DeleteSubcontractingDependentPurchaseLines was done, does it make sense to have same Purchase Line filters?

Both in file src/Apps/W1/Subcontracting/App/src/Process/Codeunits/SubcSynchronizeManagement.Codeunit.al

if not TransferHeader.IsEmpty() then begin
TransferHeader.FindFirst();
ItemLedgerEntry2.SetRange("Order Type", "Inventory Order Type"::Production);
ItemLedgerEntry2.SetRange("Order No.", ProductionOrder."No.");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If I read this then I am not sure what we want to ensure here. Mabe the originally intention was to check if the transfer order has any item ledger entries yet? I think that we only want to delete the transfer order if nothing has been posted so far.
Using the same filtering as for ItemLedgerEntry Variable makes no sense because the ItemLedgerEntry2.IsEmpty will always be true because it would equal one of the if statements above in this procedure. If we filter on transfer item ledger entries the TransferHeader will only be deleted if there are no transfer postings. We are in the case of switching the vendor no so ifthere are some postings on the wrong vendor the user must have the possibility to finish posting the transfer and it should not be deleted.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants