In Dynamics NAV 2018, I'm trying to loop through my selected records in a page and change the column "App" to TRUE in all selected records when clicking button "Incluir en APP":
What I've been trying so far is:
CurrPage.SETSELECTIONFILTER(Rec);
REPEAT
Rec.App := TRUE;
Rec.MODIFY;
UNTIL Rec.Next := 0;
But that will modify all displayed records and not all selected.
Also tested without CurrPage.SETSELECTIONFILTER(Rec);
but made no difference.
How can I loop only the selected records?