cancel
Showing results for 
Search instead for 
Did you mean: 

Add item product in Customer Quote using ABSL.

pablo_daniel
Participant

Hi experts, i found a problem trying to add a product using ABSL Code.

Basically, i was created a Script that calls a WS (this WS returs a List of products with the ID Product, Quantity and Measure) and when a try to add a product i have a message Exception.

1) Using this way, inside the script in the CustomerQuote Extension BO , the products was added but i have a message exception (The product doesnt exist )

var itemToCreate = this.Item.Create(); //In this line, the exception is raised 😞 itemToCreate.ItemProduct.ProductKey.ProductID.content = material.InternalID.content; itemToCreate.ItemProduct.QuantityMeasureUnitCode = itemResp.GUabsmg; itemToCreate.FirstRequestedItemScheduleLine.Quantity.content = itemResp.zRtCmp ;

2) I tried another way to add a product but i cannot see the node/association ItemProduct.

var itemToCreate : elementsof CustomerQuote.Item;

//In the following lines i have an error because i cannot to access to the association ItemProduct.

itemToCreate.ItemProduct.ProductKey.ProductID.content = material.InternalID.content; itemToCreate.ItemProduct.QuantityMeasureUnitCode = itemResp.GUabsmg; itemToCreate.FirstRequestedItemScheduleLine.Quantity.content = itemResp.zRtCmp ;

There is another way to add the products??

Thanks!!!

View Entire Topic
pablo_daniel
Participant

Hi Pranav, I tried by this way.

In debug mode, the Warning is raised in the line var createitem = this.Item.Create();

When the product is setted, in the followings lines, the product is saved 🙂 but the warning is showed :(.

Thanks!