【发布时间】:2017-07-29 17:08:00
【问题描述】:
大家好,我遇到了这个问题,我尝试从这个表中获取信息(例如,一个inventoryID 和所有子文章),但是咨询崩溃了,因为它需要很多时间。
我现在卡住了,我在 php 中有这个,但是如果有人可以帮助我,如果是 C# 就可以了
$Gate = new AcumaticaGate($user, $pass);
$schema = $Gate->Client->IN401000GetSchema(new IN401000GetSchema())->GetSchemaResult;
$Gate->Client->IN401000Clear(new IN401000Clear());
$export = new IN401000Export();
$export->commands = array
(
$schema->Selection->ServiceCommands->EveryInventoryID,
$schema->Selection->InventoryID,
//$schema->InventorySummary->DisplayName ,
//$schema->InventorySummary->InventoryID ,
//$schema->InventorySummary->Subitem ,
//$schema->InventorySummary->Warehouse ,
//$schema->InventorySummary->Available ,
//$schema->InventorySummary->BaseUnit,
);
$field = new Field();
$field->FieldName = "InventoryID";
$field->ObjectName = $schema->Selection->InventoryID->ObjectName;
$export->filters = array();
$filter_command = $Gate->PrepareSimpleFilter($field, FilterCondition::Contain, "10091"); // Filtro para buscar los 15 articulos Anteriores
array_push($export->filters,$filter_command);
$export->breakOnError = true;
$export->includeHeaders = false;
$export->topCount = 10;
try
{
$export_result = $Gate->Client->IN401000Export($export)->ExportResult;
unset($Gate->Client);
}
catch (Exception $e) {
console($e);
}
return $export_result->ArrayOfString;
【问题讨论】:
标签: c# php acumatica webservices-client