Insert Retention Policy Allowed Tables when open page instead#4178
Merged
Insert Retention Policy Allowed Tables when open page instead#4178
Conversation
grobyns
approved these changes
Jul 22, 2025
gggdttt
approved these changes
Jul 23, 2025
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Subscribing to the
OnAfterLogintrigger is causing problems for newly created companies. Moving the Allowed Tables insertion to OnOpenPage ofRetentionPolicySetupList.Page.alinstead.Decided to throw the event
OnRefreshAllowedTablesbecause 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