on 04-12-2018 11:31 AM
I'm trying to add Sales Order line item with ABSL Code. The line Items created successfully but the problem is updating Quantity
Code:
var elSalesOrder_Item: elementsof SalesOrder.Item;
var instSalesOrder_Item;
elSalesOrder_Item.ID = "10";
instSalesOrder_Item = this.Item.Create(elSalesOrder_Item); instSalesOrder_Item.ItemProduct.ProductKey.ProductID.content = "P100109";
if (instSalesOrder_Item.FirstRequestedItemScheduleLine.IsSet()) { instSalesOrder_Item.FirstRequestedItemScheduleLine.Quantity.content = 15; instSalesOrder_Item.FirstRequestedItemScheduleLine.Quantity.unitCode = "EA";
} else {
var elScheduleLine : elementsof instSalesOrder_Item.ItemScheduleLine; elScheduleLine.Quantity.content = 15;
elScheduleLine.Quantity.unitCode = "EA";
var instScheduleLine = instSalesOrder_Item.ItemScheduleLine.Create(elScheduleLine); ----> instScheduleLine always null
}
The instScheduleLine always null, so the item schedule line isn't created, please help me on this topic.
Hao,
Don't bother creating a schedule line. Rather, go into FirstRequestedItemScheduleLine, checking to see if it's set, and set the quantity there. That association should be set after the product's been added; if not, create that specific association, rather than trying to add a generic ItemScheduleLine instance.
Lewis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tks Lewis 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.