Table Info: Don't return to the saved position for non-AL defined indices#6782
Open
Table Info: Don't return to the saved position for non-AL defined indices#6782
Conversation
BardurKnudsen
approved these changes
Feb 24, 2026
| Rec.Get(RecordIDOfCurrentPosition); // Return to the same position in the list after refreshing the data. | ||
|
|
||
| if Rec."Metadata Defined" then | ||
| Rec.Get(RecordIDOfCurrentPosition); // Return to the same position, not possible for non-AL defined indexes as they are removed from the underlying table. |
Contributor
There was a problem hiding this comment.
Just for resilience, you could consider doing an "if Rec.Get( .... then"
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.
Problem:
When an non-AL defined index is disabled (turned off) it doesn't exist anymore (neither in Database Index VT or Key VT), so it will no longer exist in the temp table, leading to an error.
Solution:
Don't attempt to return to the position for non-AL defined indices after disabling them. Instead the position will just be the first index.
Fixes AB#622744