如何解决错误:“发票和备忘”屏幕上的Acumatica SOAP API发布发票AR301000
我正在尝试使用基于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();
解决方法
首先需要确保发票未保留-如果已保留,则Get返回的实体将为空。那可能是个问题。
还可以在调用中尝试使用ReleaseInvoice()代替Release()吗?
InvokeResult invokeResult = client.Invoke(发票,新的ReleaseInvoice());
过去对我有用。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。