Skip to content

Comments

Table Info: Don't return to the saved position for non-AL defined indices#6782

Open
PhDuck wants to merge 2 commits intomainfrom
bugs/622744/DatabaseIndexFixNonMetadataIndicesPositionBug
Open

Table Info: Don't return to the saved position for non-AL defined indices#6782
PhDuck wants to merge 2 commits intomainfrom
bugs/622744/DatabaseIndexFixNonMetadataIndicesPositionBug

Conversation

@PhDuck
Copy link
Contributor

@PhDuck PhDuck commented Feb 23, 2026

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

@PhDuck PhDuck changed the title Don't return to the original position for non-AL defined indices Table Info: Don't return to the saved position for non-AL defined indices Feb 23, 2026
@PhDuck PhDuck requested a review from BardurKnudsen February 23, 2026 21:02
@github-actions github-actions bot added this to the Version 28.0 milestone Feb 23, 2026
@PhDuck PhDuck marked this pull request as ready for review February 24, 2026 10:24
@PhDuck PhDuck requested a review from a team as a code owner February 24, 2026 10:24
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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Just for resilience, you could consider doing an "if Rec.Get( .... then"

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.

2 participants