错误 AR303000 提交使用 php - Api Acumatica ERP
error AR303000Submit use php - Api Acumatica ERP
我正在连接 api 的 Acumatica。目前,我使用 AR303000Submit 函数。但它 return 错误
Error #102: View doesn't exist.
at PX.Data.PXViewCollection.get_Item(String key)
at PX.Api.SyImportProcessor.SyStep.FillSearches(String viewName, SyView view, List`1 srchs, List`1 sorts, List`1 descs)
at PX.Api.SyImportProcessor.SyStep.SelectRows(String viewName, PXFilterRow[] filters, Int32 topCount, Boolean bypassInserted, Int32 startRow, Dictionary`2 externalSorts)
at PX.Api.SyImportProcessor.ExportTableHelper.a(SyStep A_0, GrowingTable A_1, SyCommand A_2, PXFilterRow[] A_3, Int32 A_4)
at PX.Api.SyImportProcessor.ExportTableHelper.ExportTable()
at PX.Api.ScreenUtils.Submit(String screenId, Command[] commands, SchemaMode schemaMode, PXGraph& graph, String& redirectContainerView, String& redirectScreen, Boolean mobile, Dictionary`2 viewFilters)
at PX.Api.Services.ScreenService.Submit(String id, IEnumerable`1 commands, SchemaMode schemaMode, Boolean mobile, PXGraph& forceGraph, String& redirectContainerView, String& redirectScreen, Dictionary`2 viewFilters)
at PX.Api.Services.ScreenService.Submit(String id, IEnumerable`1 commands, SchemaMode schemaMode)
at PX.Api.Soap.Screen.ScreenGate.Submit(Command[] commands)
--- End of inner exception stack trace ---
我知道关于这个对象的一些问题很多但是这是旧的或者没有更新
我的代码
$AR303000GetSchema = $acumatica->client->AR303000GetSchema(new GetSchema());
$AR303000GetSchema = $AR303000GetSchema->GetSchemaResult;
$acumatica->client->AR303000Clear(new Clear());
$AR303000Submit = new Submit();
$AR303000Submit->commands = array
(
$acumatica->prepareValue("TEST123", $AR303000GetSchema->CustomerSummary->CustomerID),
$acumatica->prepareValue("TEST123", $AR303000GetSchema->CustomerSummary->CustomerName),
$acumatica->prepareValue('US', $AR303000GetSchema->GeneralInfoMainAddress->Country),
$AR303000GetSchema->Actions->Save
);
$submit_result = $acumatica->client->AR303000Submit($AR303000Submit);
帮帮我。谢谢
试了一下
$schema = $AR303000GetSchema;
$cmds = array();
$cmd = new Value();
$cmd->Value = "giahoang";
$cmd->LinkedCommand = $schema->CustomerSummary->CustomerID;
$soapvar = new \SoapVar($cmd, SOAP_ENC_OBJECT, "Value", "http://www.acumatica.com/typed/");
array_push($cmds, $soapvar);
$cmd = new Value();
$cmd->Value = "giahoang";
$cmd->LinkedCommand = $schema->CustomerSummary->CustomerName;
$soapvar = new \SoapVar($cmd, SOAP_ENC_OBJECT, "Value", "http://www.acumatica.com/typed/");
array_push($cmds, $soapvar);
$cmd = new Value();
$cmd->Value = "US";
$cmd->LinkedCommand = $schema->GeneralInfoMainAddress->Country;
$soapvar = new \SoapVar($cmd, SOAP_ENC_OBJECT, "Value", "http://www.acumatica.com/typed/");
array_push($cmds, $soapvar);
$cmd = new Value();
$cmd->Value = "hoang@acumatica.com";
$cmd->LinkedCommand = $schema->GeneralInfoMainContact->Email;
$soapvar = new \SoapVar($cmd, SOAP_ENC_OBJECT, "Value", "http://www.acumatica.com/typed/");
array_push($cmds, $soapvar);
$soapvar = new \SoapVar($schema->Actions->Save, SOAP_ENC_OBJECT, "Action", "http://www.acumatica.com/typed/");
array_push($cmds, $soapvar);
$submit_result = $acumatica->client->AR303000Submit(array(array("commands" => $cmds)));
print_r($submit_result);
return错误
System.Web.Services.Protocols.SoapException: Server was unable to process request. --->
System.ArgumentNullException: Value cannot be null.\nParameter name: source\n
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)\n
at PX.Api.Soap.Screen.ScreenGate.Submit(Command[] commands)\n
--- End of inner exception stack trace ---
我不知道我搞错了。
PS: 我试试C#,没问题
这是一般性错误,您的代码似乎有问题。
您还可以查看 Acumatica 大学的一般帮助和信息,那里有培训指南。
我正在连接 api 的 Acumatica。目前,我使用 AR303000Submit 函数。但它 return 错误
Error #102: View doesn't exist.
at PX.Data.PXViewCollection.get_Item(String key)
at PX.Api.SyImportProcessor.SyStep.FillSearches(String viewName, SyView view, List`1 srchs, List`1 sorts, List`1 descs)
at PX.Api.SyImportProcessor.SyStep.SelectRows(String viewName, PXFilterRow[] filters, Int32 topCount, Boolean bypassInserted, Int32 startRow, Dictionary`2 externalSorts)
at PX.Api.SyImportProcessor.ExportTableHelper.a(SyStep A_0, GrowingTable A_1, SyCommand A_2, PXFilterRow[] A_3, Int32 A_4)
at PX.Api.SyImportProcessor.ExportTableHelper.ExportTable()
at PX.Api.ScreenUtils.Submit(String screenId, Command[] commands, SchemaMode schemaMode, PXGraph& graph, String& redirectContainerView, String& redirectScreen, Boolean mobile, Dictionary`2 viewFilters)
at PX.Api.Services.ScreenService.Submit(String id, IEnumerable`1 commands, SchemaMode schemaMode, Boolean mobile, PXGraph& forceGraph, String& redirectContainerView, String& redirectScreen, Dictionary`2 viewFilters)
at PX.Api.Services.ScreenService.Submit(String id, IEnumerable`1 commands, SchemaMode schemaMode)
at PX.Api.Soap.Screen.ScreenGate.Submit(Command[] commands)
--- End of inner exception stack trace ---
我知道关于这个对象的一些问题很多但是这是旧的或者没有更新
我的代码
$AR303000GetSchema = $acumatica->client->AR303000GetSchema(new GetSchema());
$AR303000GetSchema = $AR303000GetSchema->GetSchemaResult;
$acumatica->client->AR303000Clear(new Clear());
$AR303000Submit = new Submit();
$AR303000Submit->commands = array
(
$acumatica->prepareValue("TEST123", $AR303000GetSchema->CustomerSummary->CustomerID),
$acumatica->prepareValue("TEST123", $AR303000GetSchema->CustomerSummary->CustomerName),
$acumatica->prepareValue('US', $AR303000GetSchema->GeneralInfoMainAddress->Country),
$AR303000GetSchema->Actions->Save
);
$submit_result = $acumatica->client->AR303000Submit($AR303000Submit);
帮帮我。谢谢
试了一下 $schema = $AR303000GetSchema;
$cmds = array();
$cmd = new Value();
$cmd->Value = "giahoang";
$cmd->LinkedCommand = $schema->CustomerSummary->CustomerID;
$soapvar = new \SoapVar($cmd, SOAP_ENC_OBJECT, "Value", "http://www.acumatica.com/typed/");
array_push($cmds, $soapvar);
$cmd = new Value();
$cmd->Value = "giahoang";
$cmd->LinkedCommand = $schema->CustomerSummary->CustomerName;
$soapvar = new \SoapVar($cmd, SOAP_ENC_OBJECT, "Value", "http://www.acumatica.com/typed/");
array_push($cmds, $soapvar);
$cmd = new Value();
$cmd->Value = "US";
$cmd->LinkedCommand = $schema->GeneralInfoMainAddress->Country;
$soapvar = new \SoapVar($cmd, SOAP_ENC_OBJECT, "Value", "http://www.acumatica.com/typed/");
array_push($cmds, $soapvar);
$cmd = new Value();
$cmd->Value = "hoang@acumatica.com";
$cmd->LinkedCommand = $schema->GeneralInfoMainContact->Email;
$soapvar = new \SoapVar($cmd, SOAP_ENC_OBJECT, "Value", "http://www.acumatica.com/typed/");
array_push($cmds, $soapvar);
$soapvar = new \SoapVar($schema->Actions->Save, SOAP_ENC_OBJECT, "Action", "http://www.acumatica.com/typed/");
array_push($cmds, $soapvar);
$submit_result = $acumatica->client->AR303000Submit(array(array("commands" => $cmds)));
print_r($submit_result);
return错误
System.Web.Services.Protocols.SoapException: Server was unable to process request. --->
System.ArgumentNullException: Value cannot be null.\nParameter name: source\n
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)\n
at PX.Api.Soap.Screen.ScreenGate.Submit(Command[] commands)\n
--- End of inner exception stack trace ---
我不知道我搞错了。 PS: 我试试C#,没问题
这是一般性错误,您的代码似乎有问题。
您还可以查看 Acumatica 大学的一般帮助和信息,那里有培训指南。