Skip to Content
0

Update Sales Order with ABSL

Nov 23, 2017 at 07:46 PM

63

avatar image

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
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Lewis Peters Nov 27, 2017 at 11:15 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded