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

Notifications

Announcements

No record found.

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,039 Super User 2025 Season 2 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 467 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 420 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 241 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans