Acumatica从V6升级到2018R2后,基于“准备发票”屏幕的Web API停止工作

时间:2018-12-18 23:45:06

标签: web-services acumatica

我们有基于屏幕的API,可以添加销售订单,然后准备发票,直到Acumatica从v6升级到2018R2之后,它一直可以正常工作。根据发行说明和代码,似乎唯一的区别是“ Quick Process”选项,该选项仅在2018R2中可用,但是,我们未启用该选项,并假定它不会影响我们的API。

以下是API代码:

            ....................
            SO301000Content SO301000 = context.SO301000GetSchema();
            context.SO301000Clear();

            SO301000.Actions.PrepareInvoiceAction.Commit = true;

            List<Command> cmds = new List<Command>();

            cmds.Add(new Value { Value = soType, LinkedCommand = SO301000.OrderSummary.OrderType});
            cmds.Add(new Value { Value = soNbr, LinkedCommand = SO301000.OrderSummary.OrderNbr });
            cmds.Add(new Value { Value = customerCD, LinkedCommand = SO301000.OrderSummary.Customer, Commit = true });
            cmds.Add(new Value { Value = customerLocation, LinkedCommand = SO301000.OrderSummary.Location});


            cmds.Add(SO301000.Actions.PrepareInvoiceAction);
            cmds.Add(SO301000.Actions.Save);


            SO301000Content[] SO30100content = context.SO301000Submit(cmds.ToArray());
            .......................

此代码运行后,我们收到如下错误:

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> PX.Data.PXActionDisabledException: Error: The Save button is disabled.
at PX.Data.PXAction`1.<Press>d__31.MoveNext()
at PX.Api.SyImportProcessor.SyStep.a(Object A_0, PXFilterRow[] A_1, PXFilterRow[] A_2)
at PX.Api.SyImportProcessor.ExportTableHelper.ExportTable()
at PX.Api.ScreenUtils.Submit(String screenId, IReadOnlyList`1 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 ---

有人对此问题有任何想法吗?

顺便说一下,我们将在不久的将来转向REST API,但是由于工作量大,我们想先进行升级,因此我们必须首先使该API工作。

谢谢。

0 个答案:

没有答案