Hi Terry,
Terry Bottorff (7/10/2013)
Edhy I see you use a "Temporary BO" in some of your forms. So does that mean you have a Temp table in your database or are you able to get a Temp BO some other way?TIANo temporary table anywhere, just another instance of the BO either dropped in the form or programatically instantiated for the purpose on hand, here is a pseudo code:
Suppose I have a BO or OrdenItemsBO in the form, and this is used to show the Order Items in a grid or listview, then I want to do some process in another instance of the same BO:
Using TempBo As New OrdenItemsBO
' Now copy the records to the TempBO
TempBO.CopyDataFrom(Me.OrdenItemsBO1, Here the copy type required by SF)
' Now I have all the records in the temp bo and I can do whatever I want, then save it and re-fill the OrdenItemsBO1 to show the changes
For each TempBORecord in TempBO.GetEnumerable()
' Here do what you want with each record
End For
If TempBO.IsDirty = True Then
TempBO.Save()
Me.OrdenItemsBO1.FillAll()
End If
End Using
Again, above is just pseudo code from my head, not a real example. And this would be needed in case you want to process some records from the whole list. I also use a lot of BO.Filter conditions before copying the data to the TempBO, but be aware that when using BO.Filter or BO.Sort conditions, that these must be set to empty before adding new records, or your new records will not be included in the BO.CurrentView.
Edhy Rijo