November Happy Hour will be moved to Thursday December 5th.

Remove Payments from OrderForm

Vote:
 

Hi all

We use the Cart and related objects to store state during our checkout flow. I would like to use the OrderForm.Payment to temproary stor which payment type the user has selected, but there seems to be a problem removing the Payment entries from the list.

I have tried with this code:

orderForm.Payments.Clear();
orderForm.AcceptChanges();

This does not work. When I load the cart again, any old Payment objects still exist in the collection.

I have resorted to this code instead, and this seems to work:

foreach (MetaObject mo in orderForm.Payments)
{
  mo.Delete();
}
orderForm.AcceptChanges();

Is this a bug, or am i doing something wrong?


Regards

Anders

#80978
Feb 06, 2014 11:33
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.