Как я могу получить данные с экрана IN401000 с помощью веб-сервисов

Привет всем, у меня есть эта проблема, я пытаюсь получить информацию из этой таблицы (например, один инвентарный идентификатор и все подразделы), но консультация терпит крах, потому что это занимает много времени.

Я застрял прямо сейчас, у меня есть это в 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;

0

Решение

При работе с экраном запроса вы всегда должны использовать Submit совершать вместо Export, Ниже приведен пример в C #, показывающий, как экспортировать данные с помощью API на основе экрана из экрана Сводка инвентаризации (IN401000) для данного элемента инвентаризации:

IN401000WebRef.Content itemSumSchema = IN401000context.GetSchema();
var itemSumCommands = new IN401000WebRef.Command[]
{
new IN401000WebRef.Value
{
LinkedCommand = itemSumSchema.Selection.InventoryID,
Value = item[0]
},
new IN401000WebRef.Value
{
LinkedCommand = itemSumSchema.Selection.ExpandByLotSerialNumber,
Value = "True"},
itemSumSchema.InventorySummary.Warehouse,
itemSumSchema.InventorySummary.Location,
itemSumSchema.InventorySummary.OnHand,
itemSumSchema.InventorySummary.EstimatedTotalCost,
itemSumSchema.InventorySummary.LotSerialNumber
};
var serials = IN401000context.Submit(itemSumCommands);
0

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector