error in sales order SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid column name 'XYZ'.

hi all when I open the sales order I get a error message

Cannot select a record in Order lines (SalesLine).
The SQL database has issued an error.

SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid column name ‘XYZ’.

T1.SALESID,T1.LINENUM,T1.ITEMID,T1.SALESSTATUS,T1.NAME,T1.EXTERNALITEMID,T1.TAXGROUP,T1.QTYORDERED,T1.SALESDELIVERNOW,T1.REMAINSALESPHYSICAL,T1.REMAINSALESFINANCIAL,T1.COSTPRICE,T1.SALESPRICE,T1.CURRENCYCODE,T1.LINEPERCENT,T1.LINEDISC,T1.LINEAMOUNT,T1.CONFIRMEDDLV,T1.RESERVATION,T1.SALESGROUP,T1.SALESUNIT,T1.PRICEUNIT,T1.PROJTRANSID,T1.INVENTTRANSID,T1.CUSTGROUP,T1.CUSTACCOUNT,T1.SALESQTY,T1.SALESMARKUP,T1.INVENTDELIVERNOW,T1.MULTILNDISC,T1.MULTILNPERCENT,T1.SALESTYPE,T1.BLOCKED,T1.COMPLETE,T1.REMAININVENTPHYSICAL,T1.TRANSACTIONCODE,T1.TAXITEMGROUP,T1.TAXAUTOGENERATED,T1.UNDERDELIVERYPCT,T1.OVERDELIVERYPCT,T1.BARCODE,T1.BARCODETYPE,T1.INVENTREFTRANSID,T1.INVENTREFTYPE,T1.INVENTREFID,T1.INTERCOMPANYORIGIN,T1.ITEMBOMID,T1.ITEMROUTEID,T1.LINEHEADER,T1.SCRAP,T1.DLVMODE,T1.INVENTTRANSIDRETURN,T1.PROJCATEGORYID,T1.PROJID,T1.INVENTDIMID,T1.TRANSPORT,T1.STATPROCID,T1.PORT,T1.PROJLINEPROPERTYID,T1.RECEIPTDATEREQUESTED,T1.CUSTOMERLINENUM,T1.PACKINGUNITQTY,T1.PACKINGUNIT,T1.INTERCOMPANYINVENTTRANSID,T1.REMAININVENTFINANCIAL,T1.DELIVERYNAME,T1.DELIVERYTYPE,T1.CUSTOMERREF,T1.PURCHORDERFORMNUM,T1.RECEIPTDATECONFIRMED,T1.STATTRIANGULARDEAL,T1.SHIPPINGDATEREQUESTED,T1.SHIPPINGDATECONFIRMED,T1.ADDRESSREFRECID,T1.ADDRESSREFTABLEID,T1.SERVICEORDERID,T1.LINEDELIVERYTYPE,T1.SHIPCARRIERID,T1.SHIPCARRIERACCOUNT,T1.SHIPCARRIERDLVTYPE,T1.SHIPCARRIERACCOUNTCODE,T1.SALESCATEGORY,T1.DELIVERYDATECONTROLTYPE,T1.ACTIVITYNUMBER,T1.LEDGERDIMENSION,T1.RETURNALLOWRESERVATION,T1.MATCHINGAGREEMENTLINE,T1.SYSTEMENTRYSOURCE,T1.SYSTEMENTRYCHANGEPOLICY,T1.MANUALENTRYCHANGEPOLICY,T1.ITEMREPLACED,T1.RETURNDEADLINE,T1.EXPECTEDRETQTY,T1.RETURNSTATUS,T1.RETURNARRIVALDATE,T1.RETURNCLOSEDDATE,T1.RETURNDISPOSITIONCODEID,T1.DELIVERYPOSTALADDRESS,T1.SHIPCARRIERPOSTALADDRESS,T1.SHIPCARRIERNAME,T1.DEFAULTDIMENSION,T1.SOURCEDOCUMENTLINE,T1.STOCKEDPRODUCT,T1.ITEMPBAID,T1.PSAPROJPROPOSALQTY,T1.PSAPROJPROPOSALINVENTQTY,T1.PDSEXCLUDEFROMREBATE,T1.RETAILVARIANTID,T1.LRTISSUETYPE,T1.LRTTRANSACTIONTYPE,T1.LRTINVENTTRANSIDTO,T1.LRTINVENTDIMIDTO,T1.LRTRENTALFROMDATETIME,T1.LRTRENTALFROMDATETIMETZID,T1.LRTRENTALTODATETIME,T1.LRTRENTALTODATETIMETZID,T1.LRTBUNDLEID,T1.LRTOPERATINGUNITVALUE,T1.LRTOPERATINGUNITUNITID,T1.LRTPERCENTOFBASEPRICE,T1.LRTTIMEUNITQTY,T1.LRTTIMEUNITPRICE,T1.LRTOPERATINGUNITPRICE,T1.LRTTARIFFUNITID,T1.LRTPRICEACQUISITIONCODE,T1.LRTRENTALWORKTIMEID,T1.LRTPRICESCALETYPE,T1.LRTPRICESCALE,T1.LRTPRICINGITEMID,T1.LRTOPERATINGUNITEXCEPTEDQTY,T1.LRTPRICESCALEID,T1.LRTPROJECTLEVEL1,T1.LRTPROJECTLEVEL2,T1.LRTPROJECTLEVEL3,T1.LRTPROJECTLEVEL4,T1.LRTCOMPANYSRCCOUNTRY,T1.LRTISCONSTRUCTION,T1.LTMPUSHQTY,T1.LTMPULLQTY,T1.LRTTAXGROUPRENTAL,T1.LRTISRENTALINVOICE,T1.LRTRENTEDITEMID,T1.LRTRENTALISSUEREFID,T1.LRTRENTALRECEIPTREFID,T1.LRTRENTALISSUETYPE,T1.LRTRENTALRECEIPTTYPE,T1.LTMSHIPMENTFRAMEWORKID,T1.LRTSALESQUOTATIONINVENTTRANSID,T1.LRTSALESORDERSTATUSID,T1.LRTACCRUEDRENT,T1.LRTRENTALSTOCKTRANSIDSALES,T1.LWSISWARRANTYCASE,T1.LTMREQUESTEDDELIVERYUNTIL,T1.LTMREQUESTEDDELIVERYUNTILTZID,T1.LTMREQUESTEDDELIVERYFROM,T1.LTMREQUESTEDDELIVERYFROMTZID,T1.LRTISLWSORDERTABLE,T1.LRTISPREPAYMENT,T1.LRTLINEDISCRENTALOPERATINGUNIT,T1.LRTLINEDISCRENTALTIMEUNIT,T1.LRTLINEPERCRENTALOPERATINGUNIT,T1.LRTLINEPERCRENTALTIMEUNIT,T1.LRTREPLACEMENTITEMID,T1.LRTREPLACEMENTINVENTSERIALID,T1.LRTINSURANCEREFINVENTTRANSID,T1.LRTISTIMERECORDPOSITION,T1.LRTESTABLISHEDSTAFFACTIVITYID,T1.LRTINCLUDEDINALLINCLUSIVE,T1.LRTORIGINVENTTRANSID,T1.LRTINVENTTRANSIDRETURN,T1.LRTREFUNDINGLINE,T1.LRTPERMISSIONVALIDFROM,T1.LRTPERMISSIONVALIDFROMTZID,T1.LRTPERMISSIONVALIDTO,T1.LRTPERMISSIONVALIDTOTZID,T1.LRTRENTEDINVENTDIMID,T1.LRTPROCESSREASONID,T1.LRTTRAFFICMEASURESSTATUS,T1.LRTTRAFFICMEASURES,T1.LRTESCORTSTATUS,T1.LRTESCORT,T1.LRTAPPROVALSTATUS,T1.LRTAPPROVAL,T1.LRTSETTINGUPPERSONNELREQUIRED,T1.LRTPROCESSINGSTATUS,T1.LRTRESPONSIBLEINVENTSITEID,T1.LRTRESPONSIBLEDEPARTMENTID,T1.LRTFREEOFCHARGE,T1.LRTLINENUM,T1.LRTLINEGROUPINGTYPE,T1.LRTRENTALPRICECHANGETYPE,T1.LRTRENTALSTOCKTRANSCONDITIONS,T1.LRTRENTALSTOCKIDREFRENTALSWAP,T1.LRTGROUPHEADERPRICECALCULATED,T1.LRTPRICEORIG,T1.LRTTIMEUNITPRICEORIG,T1.LRTORIGCALCGROUPTABLEID,T1.LRTCALCGROUPID,T1.LRTLINENUMSORTABLE,T1.LRTTRANSPORTDIRECTIONTYPE,T1.LRTPARENTINVENTTRANSREFID,T1.LRTISSERVICE,T1.LRTSERVICEREFINVENTTRANSID,T1.LRTCALCULATESALESFEECOLLECTION,T1.LRTSERVICEOBJECT,T1.LRTSERVICETYPE,T1.LRTVALIDITYPERIOD,T1.LRTCOVERAGEPERCENT,T1.LRTCALCULATIONPRICE,T1.LRTCALCVALID,T1.LRTBLOCKEDFORINVOICING,T1.LRTCLOSURERENTALTERMREFRECID,T1.LRTISSITE2SITETRANSFER,T1.LRTPRINTSUBITEM,T1.LRTPRINTPRICE,T1.AGREEMENTSKIPAUTOLINK,T1.DLVTERM,T1.MCRORDERLINE2PRICEHISTORYREF,T1.PDSBATCHATTRIBAUTORES,T1.PDSITEMREBATEGROUPID,T1.PDSSAMELOT,T1.PDSSAMELOTOVERRIDE,T1.PSACONTRACTLINENUM,T1.RETAILBLOCKQTY,T1.LTMISORDER,T1.SELLINGMODELIDOKN,T1.PAYMMODEOKN,T1.PAYMSCHEDIDOKN,T1.PAYMTERMIDOKN,T1.CSIPDMALTERNATEEXTENDED,T1.CSIPDMALTERNATESPLITMETHOD,T1.CSIPDMITEMIDORIG,T1.CSIPDMLCPEFFECTIVITYDATESOVERRIDE,T1.CSIPDMREVISIONRULEOVERRIDE,T1.CSIPDMREVISIONUSEUPSPLITMETHOD,T1.DIRECTDEBITOKN,T1.MONTHSOKN,T1.MONTHLYFEEOKN,T1.GAMECONVERSIONTERMOKN,T1.NUMBEROFWARRANTYCONVERSIONSOKN,T1.PCPRICEMODELOKN,T1.AVERAGERENTALFEEPERDAYSYC,T1.CUSTOMERNOTIFICATIONDATEOKN,T1.DIRECTDEBITAUTHORITYRECEIVEDOKN,T1.DIRECTDEBITAUTHORITYRECEIVEDOKNTZID,T1.ESTIMATEDINSTALLATIONDATEOKN,T1.FULLYEARUPFRONTLICENSEBILLINGOKN,T1.GAMECATEGORYOKN,T1.GAMEPROGRAMNUMBEROKN,T1.GAMETHEMEOKN,T1.LICENSEBILLINGSOREQUIREDOKN,T1.ORDERLINESTOPPEDOKN,T1.REGULATORNOTIFICATIONDATEOKN,T1.REGULATORYNOTIFIEDDATEOKN,T1.REVENUEMONTHOKN,T1.RRTERMIDSYC,T1.CURRENTMONTHSOKN,T1.NONCURRENTMONTHSOKN,T1.TOTALMONTHSBILLEDOKN,T1.TOTALMONTHREMAINGOKN,T1.ACTUALINSTALLDATEOKN,T1.MODIFIEDDATETIME,T1.MODIFIEDBY,T1.CREATEDDATETIME,T1.CREATEDBY,T1.RECVERSION,T1.PARTITION,T1.RECID,T1.LRTNOTICE,T1.LRTPROCESSREASONCOMMENT FROM SALESLINE T1 WHERE (((PARTITION=?) AND (DATAAREAID=?)) AND ((SALESID=?) AND (((SALESSTATUS<>?) AND (SALESSTATUS<>?)) OR (SALESDELIVERNOW<>?))))

The above message comes up moment I click on list page of sales order and when ever I am trying to open the the salesline table from the aot it is also throwing the same error.

I see that few fields has been added by other developers and and form sales order form is customized one.

few of the added fields are there in the AOT under sales line but when we log in there in SQL server manager I don’t see few of the fields which are alrady present over there.

Please note I have already done compilation, synchronise, full CIL number of times.

but still it is not resolving.

Thanks,

Rohit

That’s clearly a problem with database synchronization (you application and database are not in sync). You said you’ve done synchronization - do you also say that it completed without any error?

X++ and CIL compilation won’t help; don’t waste time with it.

thanks for your reply martin,

When I do full CIL no message comes up in the end, infolog as it does in the end normally . but when I do the synchronisation it throw some errors like some customized field in sales line has problem.

As I said, CIL is irrelevant, so don’t waste time with it.

You can’t use the table because it’s not synchronized. You’ll have to address the “some errors” you mentioned.