Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/312.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Acumatica准备补货屏幕过程所有动作不起作用_C#_Soap_Acumatica - Fatal编程技术网

C# Acumatica准备补货屏幕过程所有动作不起作用

C# Acumatica准备补货屏幕过程所有动作不起作用,c#,soap,acumatica,C#,Soap,Acumatica,我在Acumatica 5.30.1672上,正在使用SOAPAPI for Screen IN508000来尝试并运行准备补货过程。我正在为准备补货的地方设置仓库ID。API调用在响应对象中返回正确的InventoryID,但当我告诉它ProcessAll时,它不是。没有错误,只是没有处理。我觉得我错过了一些琐碎的东西,但我就是看不见。当我使用GUI进行此操作时,一切工作都非常完美 using System; using System.Collections.Generic; using Sy

我在Acumatica 5.30.1672上,正在使用SOAPAPI for Screen IN508000来尝试并运行准备补货过程。我正在为准备补货的地方设置仓库ID。API调用在
响应
对象中返回正确的InventoryID,但当我告诉它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();
            }
        }
    }
}
使用系统;
使用System.Collections.Generic;
使用System.Linq;
使用系统文本;
使用System.Threading.Tasks;
使用AcumaticaTest.AcumaticaWebReference;
名称空间针灸师
{
班级计划
{
静态void Main(字符串[]参数)
{
屏幕上下文=新屏幕();
context.CookieContainer=new System.Net.CookieContainer();
context.Timeout=1200000;
context.Url=“指向SOAP API端点的Url”;
LoginResult lresult=context.Login(“,”);
IN508000Content IN508000=context.IN508000GetSchema();
context.IN508000Clear();
var命令=新命令[]
{
新值{Value=”“,LinkedCommand=IN508000.Selection.Warehouse,Commit=true},
新值{Value=“false”,LinkedCommand=IN508000.Selection.Me,Commit=true},
在508000.ItemsRequiremingReduction.InventoryID中,
IN508000.Actions.ProcessAll
};
var response=context.IN508000Submit(命令);
var status=context.IN508000GetProcessStatus();
while(status.status==ProcessStatus.InProcess)
{
status=context.IN508000GetProcessStatus();
}
}
}
}

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


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

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


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

感谢您的反馈。实际上,我们已经将问题追溯到另一个团队完成的定制。当我们删除了他们的定制,这是完美的工作。谢谢你的帮助。@MatthewCrews谢谢你的更新,很高兴听到问题解决了!如果您还有其他问题,请不要犹豫,谢谢您的反馈。实际上,我们已经将问题追溯到另一个团队完成的定制。当我们删除了他们的定制,这是完美的工作。谢谢你的帮助。@MatthewCrews谢谢你的更新,很高兴听到问题解决了!如果你还有其他问题,请不要犹豫。