cancel
Showing results for 
Search instead for 
Did you mean: 

Quote item custom field is not saved

AliakseiB
Newcomer
0 Kudos
87

Hello Experts

May be someone had a similar problem with Quote 2.0 and can advise something. 

We have a custom Python script which reads the data from excel and create quote items based on this data. In parallel script calculate the text which should be added to the Item custom field. 

Code example:

...
NewProduct = ProductHelper.CreateProduct(ZProductName)
...# logic to add VC attributes to the product and calculate itemMessage variable
NewProductInQuote = context.Quote.AddItem(NewProduct,ZQuantity)
NewProductInQuote.GetCustomField('ZFieldName').Value = itemMessage
NewProductInQuote.AsMainItem.Edit().UpdateQuote()

When we run UpdateQuote() then custom field "ZFieldName" is not saved on item level. 

If  we remove UpdateQuote() step then custom field is shown properly but the item is marked as "Incomplete or inconsistent".

Please advise what can we do in this case. 

Thank you. 

BR, Aliaksei

 

Accepted Solutions (0)

Answers (0)