Acumatica Prepare Replenishment Screen ProcessAll Action 不起作用

Acumatica Prepare Replenishment Screen ProcessAll Action not working

我在 Acumatica 5.30.1672 上使用 SOAP API 用于 Screen IN508000 以尝试 运行 准备补货流程。我正在为要准备补货的位置设置 WarehouseID。 API 调用在 response 对象中返回正确的 InventoryIDs,但是当我告诉 ProcessAll 时,它不是。没有错误,只是没有处理。我觉得我在这里遗漏了一些微不足道的东西,但我就是看不到它。当我使用 GUI 执行此操作时,一切正常。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AcumaticaTest.AcumaticaWebReference;

namespace AcumaticaTest
{
    class Program
    {
        static void Main(string[] args)
        {

            Screen context = new Screen();
            context.CookieContainer = new System.Net.CookieContainer();
            context.Timeout = 1200000;

            context.Url = "url to SOAP API Endpoint";
            LoginResult lresult = context.Login("<username>", "<password>");


            IN508000Content IN508000 = context.IN508000GetSchema();
            context.IN508000Clear();

            var commands = new Command[]
                                {
                                        new Value {Value = "<WarehouseID>", LinkedCommand = IN508000.Selection.Warehouse, Commit= true },
                                        new Value {Value = "false", LinkedCommand = IN508000.Selection.Me, Commit= true },
                                        IN508000.ItemsRequiringReplenishment.InventoryID,
                                        IN508000.Actions.ProcessAll
                                };
            var response = context.IN508000Submit(commands);

            var status = context.IN508000GetProcessStatus();
            while (status.Status == ProcessStatus.InProcess)
            {
                status = context.IN508000GetProcessStatus();
            }
        }
    }
}

我测试了你的代码,它工作得很好 - 系统为请求的仓库的物品准备补货计划,并且响应对象包含如果你打开准备补货屏幕将列出的所有物品你设置的参数。如果您想通过电子邮件将我 URL 和您网站的凭据(acumatica 的 gmichaud)发送给我,我可以看看有什么问题。

请注意,您无需为这两个字段显式设置 Commit = true(架构对象已将它们设置为 true)。我还建议在您的循环中添加 System.Threading.Thread.Sleep(1000) 以避免在处理服务器时用请求攻击服务器。