Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Unanswered

Page with SourceTableTemporary and Repeater

Posted on by 15

Hello,

I am creating a Business Central extension that has a page with a repeater. The page has a source table and SourceTableTemporary is set to true. The logic on the page inserts new items in the temporary table and the repeater is supposed to list them.

One of the problems is that once I insert one record, all subsequent inserts will throw an exception for a duplicate primary key. My key is an integer so I fixed this by adding an increment to the primary key (note that the primary key on the table is defined with AutoIncrement).

"No." := Count() + 1;
Now that I can insert multiple fields in the table it turned out that the repeater only shows the last inserted record instead of listing all records.
So, my question is - how can I create a NavigationPage, which lists multiple temporary records?
Thanks!
UPDATE 1: I accidentally did the following:
  1. Insert an item in the temp table and it shows on the first line in the repeater.
  2. Select the second line of the repeater, which is blank.
  3. Insert a second item in the temp table and it shows in the second line of the repeater.
  4. Insert a third item while the second line is selected and the second item in the repeater get replaced by the third item.

How can I move the selected repeater line to the next blank line after a record is inserted? My goal is to allow a user to enter data press enter and add items to a list.

Categories:

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,353 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,251 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans