Skip to content

Comments

Insert Retention Policy Allowed Tables when open page instead#4178

Merged
haoranpb merged 3 commits intomainfrom
bugs/581650
Jul 24, 2025
Merged

Insert Retention Policy Allowed Tables when open page instead#4178
haoranpb merged 3 commits intomainfrom
bugs/581650

Conversation

@haoranpb
Copy link
Contributor

@haoranpb haoranpb commented Jul 17, 2025

Summary

Subscribing to the OnAfterLogin trigger is causing problems for newly created companies. Moving the Allowed Tables insertion to OnOpenPage of RetentionPolicySetupList.Page.al instead.

Decided to throw the event OnRefreshAllowedTables because we have to force install allowed tables anyway. Currently, we use upgrade tag to check if it's InitialSetup, but that won't help us anymore because all upgrade tags will be set after company initialization.

Work Item(s)

Fixes AB#581650

@haoranpb haoranpb marked this pull request as ready for review July 22, 2025 08:01
@haoranpb haoranpb requested a review from a team as a code owner July 22, 2025 08:01
@haoranpb haoranpb changed the title Stop inserting retention policy during OnAfterLogin Insert Retention Policy Allowed Tables when open page instead Jul 22, 2025
@haoranpb haoranpb requested a review from grobyns July 22, 2025 08:04
@haoranpb haoranpb merged commit a7c54e2 into main Jul 24, 2025
29 checks passed
@haoranpb haoranpb deleted the bugs/581650 branch July 24, 2025 08:59
haoranpb added a commit that referenced this pull request Jul 25, 2025
#### Summary <!-- Provide a general summary of your changes -->

Set upgrade tags for newly created companies. Previously, this was not
an issue because the records are inserted during `OnAfterLogin`, but
that is no longer the case after #4178

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#592991](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/592991)
haoranpb added a commit that referenced this pull request Jul 30, 2025
#### Summary <!-- Provide a general summary of your changes -->

Subscribing to the `OnAfterLogin` trigger is causing problems for newly
created companies. Moving the Allowed Tables insertion to OnOpenPage of
`RetentionPolicySetupList.Page.al` instead.

Decided to throw the event `OnRefreshAllowedTables` because we have to
force install allowed tables anyway. Currently, we use upgrade tag to
check if it's InitialSetup, but that won't help us anymore because all
upgrade tags will be set after company initialization.

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#581650](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/581650)
haoranpb added a commit that referenced this pull request Jul 30, 2025
#### Summary <!-- Provide a general summary of your changes -->

Set upgrade tags for newly created companies. Previously, this was not
an issue because the records are inserted during `OnAfterLogin`, but
that is no longer the case after #4178

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#592991](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/592991)
haoranpb added a commit that referenced this pull request Jul 30, 2025
#### Summary <!-- Provide a general summary of your changes -->

Subscribing to the `OnAfterLogin` trigger is causing problems for newly
created companies. Moving the Allowed Tables insertion to OnOpenPage of
`RetentionPolicySetupList.Page.al` instead.

Decided to throw the event `OnRefreshAllowedTables` because we have to
force install allowed tables anyway. Currently, we use upgrade tag to
check if it's InitialSetup, but that won't help us anymore because all
upgrade tags will be set after company initialization.

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#581650](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/581650)
haoranpb added a commit that referenced this pull request Jul 30, 2025
#### Summary <!-- Provide a general summary of your changes -->

Set upgrade tags for newly created companies. Previously, this was not
an issue because the records are inserted during `OnAfterLogin`, but
that is no longer the case after #4178

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#592991](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/592991)
haoranpb added a commit that referenced this pull request Jul 30, 2025
#### Summary <!-- Provide a general summary of your changes -->

Subscribing to the `OnAfterLogin` trigger is causing problems for newly
created companies. Moving the Allowed Tables insertion to OnOpenPage of
`RetentionPolicySetupList.Page.al` instead.

Decided to throw the event `OnRefreshAllowedTables` because we have to
force install allowed tables anyway. Currently, we use upgrade tag to
check if it's InitialSetup, but that won't help us anymore because all
upgrade tags will be set after company initialization.

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#581650](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/581650)
haoranpb added a commit that referenced this pull request Jul 30, 2025
#### Summary <!-- Provide a general summary of your changes -->

Set upgrade tags for newly created companies. Previously, this was not
an issue because the records are inserted during `OnAfterLogin`, but
that is no longer the case after #4178

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#592991](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/592991)
haoranpb added a commit that referenced this pull request Jul 31, 2025
…4280)

<!-- Thank you for submitting a Pull Request. If you're new to
contributing to BCApps please read our pull request guideline below
* https://github.com/microsoft/BCApps/Contributing.md
-->
#### Summary 

Backporting ##4178 and #4236 , this is causing more problems in PROD

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#593448](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/593448)
[AB#593445](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/593445)
[AB#593713](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/593713)
haoranpb added a commit that referenced this pull request Jul 31, 2025
…4281)

<!-- Thank you for submitting a Pull Request. If you're new to
contributing to BCApps please read our pull request guideline below
* https://github.com/microsoft/BCApps/Contributing.md
-->
#### Summary <!-- Provide a general summary of your changes -->

Backporting ##4178 and #4236 , this is causing more problems in PROD

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#593712](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/593712)
haoranpb added a commit that referenced this pull request Jul 31, 2025
…4282)

<!-- Thank you for submitting a Pull Request. If you're new to
contributing to BCApps please read our pull request guideline below
* https://github.com/microsoft/BCApps/Contributing.md
-->
#### Summary <!-- Provide a general summary of your changes -->

Backporting ##4178 and #4236 , this is causing more problems in PROD

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#593447](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/593447)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants