SQL Error on Purchase Line table after renaming NAV company

kar100kar100 Member Posts: 11
Running v. 2009 R2. Problem occurring on RTC and Classic.
We have renamed the NAV company. All looks fine (SQL tables have been renamed correctly) and users can do most tasks without a problem. However, we are getting the SQL error below when entering purchase lines (I have replaced company names for security). Strangely it is referencing the Purchase Header table when trying to insert into the Purchase Line table.
If I rename the company back to the original name the error goes away. We are not hardcoding the old company name anywhere in the database that we can find.

Microsoft Dynamics NAV Classic
The following SQL Server error or errors occurred when accessing the Purchase Line table:

208,"42S02",[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'dbo.OLD COMPANY NAME$Purchase Header'.

SQL:
INSERT INTO "Demo Database NAV (6-0)"."dbo"."NEW COMPANY NAME$Purchase Line" WITH (REPEATABLEREAD) ("Document
Type","Document No_","Line No_","Buy-from Vendor No_","Type","No_","Location Code","Posting Group","Expected Receipt
Date","Description","Description 2","Unit of Measure","Quantity","Outstanding Quantity","Qty_ to Invoice","Qty_ to
Receive","Direct Unit Cost","Unit Cost (LCY)","VAT %","Line Discount %","Line Discount Amount","Amount","Amount Including
VAT","Unit Price (LCY)","Allow Invoice Disc_","Gross Weight","Net Weight","Units per Parcel","Unit Volume","Appl_-to Item
Entry","Shortcut Dimension 1 Code","Shortcut Dimension 2 Code","Job No_","Indirect Cost %","Outstanding Amount","Qty_ Rcd_
Not Invoiced","Amt_ Rcd_ Not Invoiced","Quantity Received","Quantity Invoiced","Receipt No_","Receipt Line No_","Profit
%","Pay-to Vendor No_","Inv_ Discount Amount","Vendor Item No_","Sales Order No_","Sales Order Line No_","Drop
Shipment","Gen_ Bus_ Posting Group","Gen_ Prod_ Posting Group","VAT Calculation Type","Transaction Type","Transport
Method","Attached to Line No_","Entry Point","Area","Transaction Specification","Tax Area Code","Tax Liable","Tax Group
Code","Use Tax","VAT Bus_ Posting Group","VAT Prod_ Posting Group","Currency Code","Outstanding Amount (LCY)","Amt_ Rcd_
Not Invoiced (LCY)","Blanket Order No_","Blanket Order Line No_","VAT Base Amount","Unit Cost","System-Created Entry","Line
Amount","VAT Difference","Inv_ Disc_ Amount to Invoice","VAT Identifier","IC Partner Ref_ Type","IC Partner
Reference","Prepayment %","Prepmt_ Line Amount","Prepmt_ Amt_ Inv_","Prepmt_ Amt_ Incl_ VAT","Prepayment Amount","Prepmt_
VAT Base Amt_","Prepayment VAT %","Prepmt_ VAT Calc_ Type","Prepayment VAT Identifier","Prepayment Tax Area
Code","Prepayment Tax Liable","Prepayment Tax Group Code","Prepmt Amt to Deduct","Prepmt Amt Deducted","Prepayment
Line","Prepmt_ Amount Inv_ Incl_ VAT","Prepmt

Comments

Sign In or Register to comment.