web
You’re offline. This is a read only version of the page.
close
Skip to main content
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 275

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!

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at
    RE: Old Inventory Posting Setup Location Codes

    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

  • Suggested answer
    JAngle Profile Picture
    113 on at
    RE: Old Inventory Posting Setup Location Codes

    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

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sumit Singh Profile Picture

Sumit Singh 2,710

#2
Sohail Ahmed Profile Picture

Sohail Ahmed 2,675 Super User 2025 Season 2

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,203

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans