Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV forum
Answered

Duplicate record check

Posted on by 3,027

Hi

 In a report i have Item ledger Entry as Dataitem. I want if same Document No is read then that record should be skipped.

Data should be stored in Temporary table and checked if Document No exists then record from Item Ledger Entry should get skipped.

Thanks

  • Verified answer
    TeddyH Profile Picture
    TeddyH 12,861 Moderator on at
    RE: Duplicate record check

    Yes, the datatype can be whatever you want it to be. If you put Item Ledger Entry, the temporary record will take the Item Ledger Entry table structure.

  • jsshivalik Profile Picture
    jsshivalik 3,027 on at
    RE: Duplicate record check

    Hi

      Do we need to define Record DataType. Then what should be its SubType

    Thanks

  • jsshivalik Profile Picture
    jsshivalik 3,027 on at
    RE: Duplicate record check

    Hi Teddy

       Do we need to define Record DataType. Then what should be its SubType

    Thanks

  • Suggested answer
    TeddyH Profile Picture
    TeddyH 12,861 Moderator on at
    RE: Duplicate record check

    If you go to the properties of the variable, you should be able to see the Temporary properties. Set it there.

  • manish.yadav Profile Picture
    manish.yadav 1,835 on at
    RE: Duplicate record check

    Please go in assigned variable and  set the property Temporary - YES.

  • jsshivalik Profile Picture
    jsshivalik 3,027 on at
    RE: Duplicate record check

    Hi Teddy

      How Temp Table should be defined.

    Thanks

  • Suggested answer
    TeddyH Profile Picture
    TeddyH 12,861 Moderator on at
    RE: Duplicate record check

    TempTable.RESET;

    TempTable.SETRANGE("Document No.",ItemLedgEntry."Document No.");

    IF NOT TempTable.IsEmpty THEN

      CurrReport.SKIP

    ELSE

      //insert temptable record here

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 228,588 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans