cancel
Showing results for 
Search instead for 
Did you mean: 

Need support in SDK coding for item clear in Sale Quote BO in SAP C4C

madhurirawat19
Explorer
0 Kudos

Dear Team,

whenever we create any quotation and add the product in overview tab with wrong beg size then it's giving error as per our custom code that is fine. But when we correct the beg size and try to save again it's adding 2 time same item with ID - 10 with wrong beg size which we have corrected and 20 - same product but with our correct beg size value.

It means it's not clearing the items buffer. Then I have tried to clear in RootNode ->OnSaveMethod with below code but still it's holding the data because this.Item is holding data which I need to clear in OnSaveMethod after displaying error So I have tried below code but it's not supporting.

if (this.Item.Count() > 0)

{

var items = this.Item; // this is holding data which we need to delete

foreach (var item in items)

{

if (item.ZNotFullBag == true)

{

raise FullBagErr.Create("E", item.ID);

saveflag = false;

var itemtoremove = this.Item.Where( n => n.ID == item.ID);

this.Item.Remove(itemtoremove) ; //Getting error for this line that "Parameter type 'collection of Node(CustomerQuote.Item)' is not valid. "

}

How to remove error record after displaying error. as it's allow on BeforeSave method but if we delete this record in BeforeSave then it's not displaying error message in ONSaveMethod because item got cleared so we have clear after error message on OnSaveMethod

Thanks and Regards,

MD

Accepted Solutions (0)

Answers (0)