Это также работает с котировками или любым маркетинговым документом.
Ниже приведен код для дальнейшего использования:
попробовать { контекст apitest.Screen = новый apitest.Screen(); context.CookieContainer = новый System.Net.CookieContainer();
context.Url = "http://localhost/Acumatica52v1865/Soap/APITEST.asmx";
LoginResult lresult = context.Login("admin", "123");
var SO301000 = context.SO301000GetSchema();
context.SO301000Clear();
var commands = new List<Command>
{
new Value { LinkedCommand = SO301000.OrderSummary.OrderType, Value = "SO"},
new Value { LinkedCommand = SO301000.OrderSummary.OrderNbr, Value = "000179"},
SO301000.DocumentDetails.ServiceCommands.RowNumber,
SO301000.DocumentDetails.OrderType,
SO301000.DocumentDetails.OrderNbr,
SO301000.DocumentDetails.LineNbr,
SO301000.DocumentDetails.InventoryID,
SO301000.DocumentDetails.Quantity,
};
var content = context.SO301000Submit(commands.ToArray());
List<Command> cmds = new List<Command>();
cmds.Add(new Value { LinkedCommand = SO301000.OrderSummary.OrderType, Value = "SO" });
cmds.Add(new Value { LinkedCommand = SO301000.OrderSummary.OrderNbr, Value = "000179" });
//Remove all row,
foreach (var item in content)
{
cmds.AddRange(new List<Command>
{
SO301000.DocumentDetails.ServiceCommands.DeleteRow
});
}
cmds.Add(SO301000.DocumentDetails.ServiceCommands.NewRow);
cmds.Add(new Value { Value = "301CMPST01", LinkedCommand = SO301000.DocumentDetails.InventoryID, Commit = true });
cmds.Add(new Value { Value = "2", LinkedCommand = SO301000.DocumentDetails.Quantity, Commit = true });
cmds.Add(new Value { Value = "110", LinkedCommand = SO301000.DocumentDetails.UnitPrice });
cmds.Add(SO301000.Actions.Save);
context.SO301000Submit(cmds.ToArray());
}
catch (Exception ex)
{
throw ex;
}
Вы пробовали что-нибудь? – Hybridzz