错误AR303000提交使用php-Api Acumatica ERP [英] error AR303000Submit use php - Api Acumatica ERP

查看:88
本文介绍了错误AR303000提交使用php-Api Acumatica ERP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在连接Acumatica的api。目前,我使用AR303000Submit功能。但返回错误



 错误#102:视图不存在。在PX.Api.SyImportProcessor.SyStep.FillSearches(String viewName,SyView view,List`1 srchs,List`1 sorts,List`1 descs)处的PX.Data.PXViewCollection.get_Item(String key) .SyStep.SelectRows(字符串viewName,PXFilterRow []过滤器,Int32 topCount,布尔bypassInserted,Int32 startRow,Dictionary`2 externalSorts)在PX.Api.SyImportProcessor.ExportTableHelper.a(SyStep A_0,GrowingTable A_1,SyCommand A_2,PXFilterRow [] PX.Api.SyImportProcessor.ExportTableHelper.ExportTable()的P_Api.Api.ScreenUtils.Submit(String screenId,Command []命令,SchemaMode schemaMode,PXGraph& graph,String& redirectContainerView,String& redirectScreen,Boolean移动,位于PX.Api.Services.ScreenService.Submit(String id,IEnumerable`1命令,SchemaMode schemaMode,布尔移动,PXGraph& forceGraph,String& redirectContainerView,String& redirectScreen,Dictionary` 2 viewFilters) PX.Api.Services.Scr eenService.Submit(字符串ID,IEnumerable`1命令,SchemaMode schemaMode)位于PX.Api.Soap.Screen.ScreenGate.Submit(Command []命令)---内部异常堆栈跟踪的结尾---  



我知道关于此对象的一些问题很多,但这是旧的还是没有更新



我的代码

  $ AR303000GetSchema = $ acumatica-> client-> ; AR303000GetSchema(new GetSchema()); 
$ AR303000GetSchema = $ AR303000GetSchema-> GetSchemaResult;
$ acumatica->客户端-> 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->客户端-> AR303000Submit($ AR303000Submit);

帮帮我。谢谢



更新
我在 http://forum.acumatica.com/forum/acumatica-reseller-and-isv-community/development-and-customization/740-api-how-to-create-api-project-and-use-it -with-c-php-java?q = php (#3)

  $ 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->国家/地区;
$ 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->电子邮件;
$ 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->客户端-> AR303000Submit(array(array(array( commands => $ cmds))));
print_r($ submit_result);

返回错误



  System.Web.Services.Protocols.SoapException:服务器无法处理请求。 ---> System.ArgumentNullException:值不能为null。参数名称:System.Linq.Enumerable.ToArray [TSource](IEnumerable`1 source)中的sourcen在PX.Api.Soap.Screen.ScreenGate.Submit中(Command []命令)\n ---内部异常堆栈跟踪的结尾---  



我不知道我是误会。
PS:我尝试使用C#,就可以了

解决方案

这是普遍错误,您的代码似乎有问题。 / p>

请遵循旧文章
http://forum.acumatica .com / forum / acumatica-reseller-and-isv-community /开发和定制/ 740-api-如何创建api-项目并与c-php-java一起使用?q = php



您也可以从Acumatica Uniiveristy那里获得一般帮助和信息,其中有培训常识。


I'm connecting api of Acumatica. Present, i use AR303000Submit function. but it return error

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 ---

I know some question about this object is much but this is old or not update

My code

        $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);

Help me. Thanks

Update I try it at http://forum.acumatica.com/forum/acumatica-reseller-and-isv-community/development-and-customization/740-api-how-to-create-api-project-and-use-it-with-c-php-java?q=php (#3)

        $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 error

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 ---

I don't know i was misstake. PS: I try C#, it ok

解决方案

It's general error, looks like something wrong with your code.

please follow old article http://forum.acumatica.com/forum/acumatica-reseller-and-isv-community/development-and-customization/740-api-how-to-create-api-project-and-use-it-with-c-php-java?q=php

also you can take a look general help and info from Acumatica Univeristy there is training quide.

这篇关于错误AR303000提交使用php-Api Acumatica ERP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆