C# 如何在acumatica中使用webservices api导出数据时设置超时
这是第一种情况: -我使用WebServicesAPI在acumatica系统中创建新的“账单”文档,以显示账单和调整屏幕(AP301000)。 -之后,我需要使用Web服务加载当前屏幕(AP301000)的应用程序选项卡菜单中的所有文档记录,也用于抵销过程。问题是将加载大量文档。它大约有9500个文档,当然需要更多的时间来处理(大约10分钟) 我在导出此应用程序选项卡菜单中的所有记录时总是出错。错误信息为“操作超时” 在通过WebServicesAPI导出大量文档的过程中,是否有设置超时的参考C# 如何在acumatica中使用webservices api导出数据时设置超时,c#,web-services,acumatica,C#,Web Services,Acumatica,这是第一种情况: -我使用WebServicesAPI在acumatica系统中创建新的“账单”文档,以显示账单和调整屏幕(AP301000)。 -之后,我需要使用Web服务加载当前屏幕(AP301000)的应用程序选项卡菜单中的所有文档记录,也用于抵销过程。问题是将加载大量文档。它大约有9500个文档,当然需要更多的时间来处理(大约10分钟) 我在导出此应用程序选项卡菜单中的所有记录时总是出错。错误信息为“操作超时” 在通过WebServicesAPI导出大量文档的过程中,是否有设置超时的参考
sCon.getLoginSettlementVoucher(context);
AP301000Content billSchema2 = context.AP301000GetSchema();
List<Command> cmds = new List<Command>();
billSchema2.DocumentSummary.Type.Commit = false;
billSchema2.DocumentSummary.Type.LinkedCommand = null;
var command2 = new Command[]
{
new Value { Value = "Bill", LinkedCommand = billSchema2.DocumentSummary.Type},
new Value { Value = "17000034", LinkedCommand = billSchema2.DocumentSummary.ReferenceNbr},
billSchema2.Applications.DocTypeDisplayDocType,
billSchema2.Applications.ReferenceNbrDisplayRefNbr,
billSchema2.Applications.Balance,
billSchema2.Applications.AmountPaid
};
try
{
var applications = context.AP301000Export(command2, null, 0, false, true);
..........................
}
catch(Exception x){} finally{context.Logout()}
sCon.getLoginSettement凭单(上下文);
AP301000Content-billSchema2=context.AP301000GetSchema();
List cmds=新列表();
billSchema2.DocumentSummary.Type.Commit=false;
billSchema2.DocumentSummary.Type.LinkedCommand=null;
var command2=新命令[]
{
新值{Value=“Bill”,LinkedCommand=billSchema2.DocumentSummary.Type},
新值{Value=“17000034”,LinkedCommand=billSchema2.DocumentSummary.ReferenceNbr},
billSchema2.Applications.doctype显示doctype,
billSchema2.Applications.ReferenceNbrDisplayRefNbr,
billSchema2.Applications.Balance,
billSchema2.Applications.AmountPaid
};
尝试
{
var applications=context.AP301000Export(command2,null,0,false,true);
..........................
}
catch(异常x){}最后{context.Logout()}
-检查MSDN更好,因为Timeout属性是从.Net framework中的一个基类派生的
方法是更改Screen对象的超时值。
在你的例子中,我认为这个对象是“上下文”
默认值为100000,以毫秒为单位,因此为1分40秒。如果将此值更改为700000(约为11分钟半),则应该可以
以下是如何做到这一点:
context.Timeout=700000