Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Delete item ledger entry from code

(0) ShareShare
ReportReport
Posted on by 75

Hi, here I want to delete my Item ledger entries table through Al code in business central , how cam delete it, is there any codeunit please help it's urgent

Thnakyou 

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 74,115 Super User 2024 Season 2 on at
    RE: Delete item ledger entry from code

    Hi, As mentioned by previous experts, please do not delete the Item Ledger Entry table directly.

    I just simply share the method. Please don't try.

    If you want to modify the posted data in BC, you need to set the Permissions Property for your object first.

    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-permissions-property

    For example,

    pastedimage1684107833789v1.png

    Hope this helps.

    Thanks.

    ZHU

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: Delete item ledger entry from code

    Like other here have told you. Deleting the Item Ledger Entries is not a good idea. And if you do that there is also a lot of other things you need to delete in your database to not ruin the integrity of your Business Central database.

    Technically it is not an advanced operation to do but it requires a lot of other considerations before it is done.

    Normally it is only something I would do if I should clear a company of all transactions and then there is probably 30 more tables i need to delete data in to keep the integrity of my system.

  • Suggested answer
    NAV_with_Narang Profile Picture
    NAV_with_Narang 2,236 Super User 2024 Season 1 on at
    RE: Delete item ledger entry from code

    Deleting ILE may cause accounting mismatches, there is no default codeunit for this, I suggest do not make such a provision unless you are only just doing these for testing

  • Suggested answer
    tanya07 Profile Picture
    tanya07 1,554 on at
    RE: Delete item ledger entry from code

    Hi,

    Deleting ILEs would definitely will be not good option. It will make the database vulnerable.

    What is the purpose of deleting ILEs if I may ask?

    Regards,

    Tanya Kharbanda

    Don't forget to help the community by verifying the answer if your question has been answered. It will let others know that the topic has a verified answer.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans