【发布时间】:2020-11-12 18:34:15
【问题描述】:
我正在尝试使用 I210 基于合同的 Web 服务指南中所述的 SOAP API 从发票和备忘录屏幕 (AR301000) 发布特定发票。
调试我的代码,当我发布特定发票时出现此错误:
System.ServiceModel.FaultException: 'PX.Data.PXInvalidOperationException: Operation failed ---> System.Data.SqlClient.SqlException: The multi-part identifier "LocationExtAddress.LocationBAccountID" could not be bound.
The multi-part identifier "LocationExtAddress.LocationCD" could not be bound.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)... and more error code
这是我的代码:
//successful login
//Invoice data
string invoiceType = "Invoice";
string invoiceNbr = "SS-00000009";
//Find the invoice to be released
ARInvoice invoiceToFind = new ARInvoice
{
Type = new StringSearch { Value = invoiceType },
ReferenceNbr = new StringSearch { Value = invoiceNbr },
Hold = new BooleanValue { Value = false }
};
ARInvoice invoice = (ARInvoice) client.Get(invoiceToFind);
//Release invoice
InvokeResult invokeResult = client.Invoke(invoice, new Release());
//Monitor the status of the process
ProcessResult processResult = LongRunProcessor.GetProcessResult(client, invokeResult);
//Get the confirmed shipment
invoice = (ARInvoice)client.Get(new ARInvoice { ID = processResult.EntityId });
//Display the summary of the invoice
txtType.Text = invoice.Type.Value;
txtNumber.Text = invoice.ReferenceNbr.Value;
txtStatus.Text = invoice.Status.Value;
client.Logout();
错误发生在调用行。
【问题讨论】: