Could anybody help me create a Shipment by adding a Sales Order in Acumatica (Version 4 or higher). I have tried the following code with no success:
SO302000Content SO302000 = context.SO302000GetSchema();
context.SO302000Clear();
Command[] commands = new Command[] {
new Value { Value = "ABCSTUDIOS", LinkedCommand = SO302000.ShipmentSummary.Customer },
new Value { Value = "09/01/2015", LinkedCommand = SO302000.ShipmentSummary.ShipmentDate },
new Value { Value = "MAIN", LinkedCommand = SO302000.ShipmentSummary.Location },
new Value { Value = "RESALE", LinkedCommand = SO302000.ShipmentSummary.WarehouseID },
new Value { Value = "SO", LinkedCommand = SO302000.AddSalesOrderOperation.OrderType },
new Value { Value = "000211", LinkedCommand = SO302000.AddSalesOrderOperation.OrderNbr },
SO302000.AddSalesOrder.InventoryID,
SO302000.AddSalesOrder.Location,
SO302000.AddSalesOrder.OpenQty,
SO302000.AddSalesOrder.OrderQty
};
var results = context.SO302000Submit(commands);
if (results != null && results.Length > 0)
{
int line = 0;
List<Command> cmds = new List<Command>();
foreach (var row in results)
{
cmds.Add(new Value {
Value = line.ToString(),
LinkedCommand = SO302000.AddSalesOrder.ServiceCommands.RowNumber }
);
cmds.Add(new Value {
Value = "True",
LinkedCommand = SO302000.AddSalesOrder.Selected,
Commit = true }
);
line++;
}
cmds.Add(SO302000.Actions.AddSO);
context.SO302000Submit(cmds.ToArray());
cmds.Clear();
cmds.Add(SO302000.Actions.Save);
cmds.Add(SO302000.Actions.ActionConfirmShipment);
results = context.SO302000Submit(cmds.ToArray());
}
The result is an error from Acumatica saying something like "View AddSOFilter Doesn't Exist" as described below:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> PX.Data.PXException: Error #97: View addsofilter doesn't exist. at PX.Data.PXViewCollection.get_Item(String key) in c:\Builders\4_10-2013_12_2-4_0_9-Auto\Scripts\BuildTemp\NetTools\PX.Data\Graph\Collection.cs:line 806 at PX.Api.SyImportProcessor.SyStep.SelectRows(String viewName, PXFilterRow[] filters, Int32 topCount, Boolean bypassInserted) in c:\Builders\4_10-2013_12_2-4_0_9-Auto\Scripts\BuildTemp\NetTools\PX.Data\Api\Export\SyImport\ImportProcessor.cs:line 2521 at PX.Api.SyImportProcessor.ExportTableHelper.a(SyStep A_0, GrowingTable A_1, SyCommand A_2, PXFilterRow[] A_3, Int32 A_4) in c:\Builders\4_10-2013_12_2-4_0_9-Auto\Scripts\BuildTemp\NetTools\PX.Data\Api\Export\SyImport\ImportProcessor.cs:line 1212 at PX.Api.SyImportProcessor.ExportTableHelper.ExportTable() in c:\Builders\4_10-2013_12_2-4_0_9-Auto\Scripts\BuildTemp\NetTools\PX.Data\Api\Export\SyImport\ImportProcessor.cs:line 675 at ScreenApi.ScreenGate.Submit(Command[] commands, SchemaMode schemaMode, PXGraph graph) in c:\Builders\4_10-2013_12_2-4_0_9-Auto\Scripts\BuildTemp\NetTools\PX.Data\Api\Export\ScreenGate.cs:line 1323 at ScreenApi.ScreenGate.Submit(Command[] commands) in c:\Builders\4_10-2013_12_2-4_0_9-Auto\Scripts\BuildTemp\NetTools\PX.Data\Api\Export\ScreenGate.cs:line 1027 --- End of inner exception stack trace ---
Thanks, G