Skip to content

Update SII subscribers SkipMissingPermissions#9643

Open
Alexander-Ya wants to merge 3 commits into
mainfrom
bugs/Update-SII-subscribers-SkipMissingPermissions
Open

Update SII subscribers SkipMissingPermissions#9643
Alexander-Ya wants to merge 3 commits into
mainfrom
bugs/Update-SII-subscribers-SkipMissingPermissions

Conversation

@Alexander-Ya

@Alexander-Ya Alexander-Ya commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

What & why

Linked work

Fixes AB#642734

How I validated this

  • I read the full diff and it contains only changes I intended.
  • I built the affected app(s) locally with no new analyzer warnings.
  • I ran the change in Business Central and confirmed it behaves as expected.
  • I added or updated tests for the new behavior, or explained below why none are needed.

What I tested and the outcome (required — be specific: scenarios, commands, screenshots for UI changes)

Risk & compatibility

@Alexander-Ya
Alexander-Ya requested a review from a team July 21, 2026 10:38
@Alexander-Ya Alexander-Ya added the Finance GitHub request for Finance area label Jul 21, 2026
@github-actions github-actions Bot added Other GitHub request for other area than SCM, Finance or Integration Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction and removed Finance GitHub request for Finance area labels Jul 21, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Jul 21, 2026
@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

Copy link
Copy Markdown
Contributor

$\textbf{🟡\ Medium\ Severity\ —\ Events}$

Same inconsistency as the other subscribers changed in this file (see line 23 finding): OnAfterValidateEvent on Gen. Journal Line 'Account No.' still has SkipOnMissingLicense = false, so it will still hard-error for tenants without the SII license/permission, unlike every other subscriber updated in this PR.

Suggested fix (apply manually — could not be anchored as a one-click suggestion):

    [EventSubscriber(ObjectType::Table, Database::"Gen. Journal Line", 'OnAfterValidateEvent', 'Account No.', true, false)]

Agent judgement — not directly backed by a BCQuality knowledge article.

Line mapping was unavailable, so this was posted as an issue comment.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.12.4

@github-actions

Copy link
Copy Markdown
Contributor

$\textbf{🟡\ Medium\ Severity\ —\ Events}$

Same inconsistency as the other subscribers changed in this file (see line 23 finding): OnAfterValidateEvent on Gen. Journal Line 'Bal. Account Type' still has SkipOnMissingLicense = false, so it will still hard-error for tenants without the SII license/permission, unlike every other subscriber updated in this PR.

Suggested fix (apply manually — could not be anchored as a one-click suggestion):

    [EventSubscriber(ObjectType::Table, Database::"Gen. Journal Line", 'OnAfterValidateEvent', 'Bal. Account Type', true, false)]

Agent judgement — not directly backed by a BCQuality knowledge article.

Line mapping was unavailable, so this was posted as an issue comment.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.12.4

@github-actions

Copy link
Copy Markdown
Contributor

$\textbf{🟡\ Medium\ Severity\ —\ Events}$

This PR flips the EventSubscriber SkipOnMissingLicense flag (5th argument) from false to true on every other subscriber in SII Purchase Subscribers, so a tenant without the SII license/permission no longer gets a hard error and is silently skipped instead. This subscriber (OnAfterValidateEvent on Purchase Header 'Pay-to Vendor No.', a core field validated on every purchase document) was left at SkipOnMissingLicense = false. It is inconsistent with the rest of the file and will still hard-error on that common validation for unlicensed tenants. The same file also leaves three more subscribers unchanged at lines 37 ('VAT Prod. Posting Group' on Purchase Line), 45 ('Vendor Invoice No.'), and 51 ('Vendor Cr. Memo No.') — all OnAfterValidateEvent subscribers on core Purchase Header/Line fields. Recommend changing all four to true to match the rest of the file, unless there is a documented reason they must remain fail-fast.

Suggested fix (apply manually — could not be anchored as a one-click suggestion):

    [EventSubscriber(ObjectType::Table, Database::"Purchase Header", 'OnAfterValidateEvent', 'Pay-to Vendor No.', true, false)]

Agent judgement — not directly backed by a BCQuality knowledge article.

Line mapping was unavailable, so this was posted as an issue comment.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.12.4

@github-actions

Copy link
Copy Markdown
Contributor

$\textbf{🟡\ Medium\ Severity\ —\ Events}$

Same inconsistency as the other subscribers changed in this file (see line 20 finding): OnAfterValidateEvent on Purchase Line 'VAT Prod. Posting Group' still has SkipOnMissingLicense = false, so it will still hard-error for tenants without the SII license/permission, unlike every other subscriber updated in this PR.

Suggested fix (apply manually — could not be anchored as a one-click suggestion):

    [EventSubscriber(ObjectType::Table, Database::"Purchase Line", 'OnAfterValidateEvent', 'VAT Prod. Posting Group', true, false)]

Agent judgement — not directly backed by a BCQuality knowledge article.

Line mapping was unavailable, so this was posted as an issue comment.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.12.4

@github-actions

Copy link
Copy Markdown
Contributor

$\textbf{🟡\ Medium\ Severity\ —\ Events}$

Same inconsistency as the other subscribers changed in this file (see line 20 finding): OnAfterValidateEvent on Purchase Header 'Vendor Invoice No.' still has SkipOnMissingLicense = false, so it will still hard-error for tenants without the SII license/permission, unlike every other subscriber updated in this PR.

Suggested fix (apply manually — could not be anchored as a one-click suggestion):

    [EventSubscriber(ObjectType::Table, Database::"Purchase Header", 'OnAfterValidateEvent', 'Vendor Invoice No.', true, false)]

Agent judgement — not directly backed by a BCQuality knowledge article.

Line mapping was unavailable, so this was posted as an issue comment.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.12.4

@github-actions

Copy link
Copy Markdown
Contributor

$\textbf{🟡\ Medium\ Severity\ —\ Events}$

Same inconsistency as the other subscribers changed in this file (see line 20 finding): OnAfterValidateEvent on Purchase Header 'Vendor Cr. Memo No.' still has SkipOnMissingLicense = false, so it will still hard-error for tenants without the SII license/permission, unlike every other subscriber updated in this PR.

Suggested fix (apply manually — could not be anchored as a one-click suggestion):

    [EventSubscriber(ObjectType::Table, Database::"Purchase Header", 'OnAfterValidateEvent', 'Vendor Cr. Memo No.', true, false)]

Agent judgement — not directly backed by a BCQuality knowledge article.

Line mapping was unavailable, so this was posted as an issue comment.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.12.4

@github-actions

Copy link
Copy Markdown
Contributor

$\textbf{🟡\ Medium\ Severity\ —\ Events}$

This PR flips the EventSubscriber SkipOnMissingLicense flag (5th argument) from false to true on every subscriber it touches in SII Sales Subscribers, so a tenant without the SII license/permission no longer gets a hard error and is silently skipped instead. This subscriber, on the same table trigger family (OnAfterValidateEvent on 'VAT Prod. Posting Group' of Sales Line, a core field validated on every sales line in every company), was left at SkipOnMissingLicense = false in this same file. If the intent is that unlicensed/non-SII tenants must not hard-fail on SII subscribers, this one is inconsistent with the rest of the file and will still throw on every Sales Line VAT Prod. Posting Group validation for such tenants. Recommend changing the 5th argument to true to match the rest of the file, unless there is a documented reason this particular trigger must remain fail-fast.

Suggested fix (apply manually — could not be anchored as a one-click suggestion):

    [EventSubscriber(ObjectType::Table, Database::"Sales Line", 'OnAfterValidateEvent', 'VAT Prod. Posting Group', true, false)]

Agent judgement — not directly backed by a BCQuality knowledge article.

Line mapping was unavailable, so this was posted as an issue comment.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.12.4

DavidHolusa
DavidHolusa previously approved these changes Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Other GitHub request for other area than SCM, Finance or Integration Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants