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 :
Microsoft Dynamics NAV (Archived)

Error The Table1 already exists

(0) ShareShare
ReportReport
Posted on by 3,099

Hi

  I have table1 , Key Location Code,Date. I want before insert if record already exists then it should not Insert.


IF TEntry.FINDFIRST THEN BEGIN
TeDate := TEntry.Date;
Amount := 0;
REPEAT
Amount += TEntry."Amount";
IF TeDate <> TEntry.Date THEN BEGIN
CNLine.VALIDATE("Store No.","No.");
CNLine.VALIDATE("Date",TEntry.Date);

CNLine.VALIDATE("Amount",TEntry."Amount");

CNLine.INSERT;
TeDate := TEntry.Date;
Amount := 0;
END;
UNTIL TEntry.NEXT=0;
END;

*This post is locked for comments

I have the same question (0)
  • Verified answer
    jsshivalik Profile Picture
    3,099 on at

    Hi

     Closed. Logic was wrong

    Thanks

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans