Skip to Content

Update Sales Order with ABSL

Hi,

I just want to update the quantity of a salesorder item within absl:

why does this not update the quantity:

salesOrder = SalesOrder.Retrieve(salesorderid);

foreach (var sOrderItemin salesOrder.Item)

{

var menge:Quantity;

var mengeInitial:Quantity;

mengeInitial.content = 0.01;

menge.content = item.InHouseExpenses.content;

var newQuantity = salesOrderItem.FirstRequestedItemScheduleLine.Quantity;

menge.unitCode = newQuantity.unitCode;

mengeInitial.unitCode = newQuantity.unitCode;

newQuantity.content = newQuantity.content+ menge.content;

salesOrder.SubmitForApproval();

}

}

Thanks Guys
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 27, 2017 at 11:15 AM

    Erhan,

    Try writing directly instead of using a variable --- I have issues with that sometimes. Try:

    'salesOrderItem.FirstRequestedItemScheduleLine.Quantity.content = newQuantity.content + menge.content;'

    Lewis

    Add comment
    10|10000 characters needed characters exceeded