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 :
Small and medium business | Business Central, N...
Answered

Old Inventory Posting Setup Location Codes

(0) ShareShare
ReportReport
Posted on by 293

Hey,

I want to get rid of some old Location Codes in the inventory posting setup that are no longer being used.  Whenever I try to delete these I get an error, I have Super rights as well.  Any insight would be appreciated 

Thanks!

  • Suggested answer
    JAngle Profile Picture
    161 on at

    The table runs this code when the delete action is chosen:

    local procedure CheckSetupUsage()

       var

           ValueEntry: Record "Value Entry";

       begin

           ValueEntry.SetRange("Location Code", "Location Code");

           ValueEntry.SetRange("Inventory Posting Group", "Invt. Posting Group Code");

           if not ValueEntry.IsEmpty then

               Error(YouCannotDeleteErr, "Location Code", "Invt. Posting Group Code");

       end;

    So if you have postings with that combination of groups you can’t delete it.

    Maybe setting a view on the page so you can just filter on the records you want to see could be done

  • Verified answer
    Community Member Profile Picture
    on at

    Hello,

    As Josh noted, removing/deleting Location Code is not allowed when transaction have been posted against them. In Josh's image he is showing you how to remove the validation to by-pass this restriction. I have taught my customers, who want to remove Locations, to change the Description to DO NOT USE. I have also taught them to create a Filter to remove those Locations from the Inventory Posting Setup page using the DO NOT USE Description.

    Hope this helps.

    Thanks,

    Steve

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 Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 665 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 418 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 280 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans