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

Announcements

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,141 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 635 Super User 2026 Season 1

#2
André Arnaud de Calavon Profile Picture

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

#3
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 557

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans