web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Issue with Duplicate Blank Records and Line Number Generation on Custom Form

(2) ShareShare
ReportReport
Posted on by 4

Hello everyone,

I have created a new form with a header table and a line table as data sources. The line table includes a LineNumber field, which increments automatically whenever a user creates a new record (e.g., by clicking the Add Line button). The Add Line button is a command button of type 'New', with the Save Record property set to Yes.

However, I've encountered an issue: if the user repeatedly clicks the Add Line button, multiple blank records are created. Even though I have a Product field marked as mandatory, these blank records are still being generated, all with the same LineNumber value of 1 (The LineNumber generation is based on existing records in the database tied to the same header reference).

This behavior is causing problems for users. As I understand it, shouldn't the standard logic for line creation should prevent duplicate blank records and display an error message if a user tries to add a new line without completing the previous one?

Is this the expected behavior and is there anything that I should have done? Any insights would be appreciated!

Categories:
I have the same question (0)
  • Suggested answer
    Waed Ayyad Profile Picture
    9,089 Super User 2026 Season 1 on at
    Hi,

    Can you share where you added the code of the line number generations?
     
    Also try to set Line table DataSource property InsertIFEmpty =No.
     
     

    Thanks,

    Waed Ayyad

    If this helped, please mark it as "Verified" for others facing the same issue

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 617

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 461 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 298 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans