Wal972 posted on Wednesday, June 07, 2006
Hi.
I need to create the collection item LineItems and then have different types created. Now I know how to the different items ProductLineItem, ServiceLineItem etc. But when I create the collection and I am fetching the various line items, do I use a case selection or something else.
ie. in the fetch command of the LineItemsCollection do I
Select Case Type
Case "Product"
Case "Service"
etc
End Select
Thanks
Pradeep replied on Sunday, June 11, 2006
If I understand correctly, You want to create a LineItems collection, which is a collection of different types of line items like ProductLineItem, ServiceLineItem, etc.
You have to have only one collection that will fetch all types of LineItems. And later when you try to open a LineItem by say double clicking on the grid, you will see what type of LineItem that object is and open the appropriate one (Product or Service).
So you will have a LineItem base object and all your other LineItem type objects will inherit from this. Then you will create a LineItem Collection object that is basically a collection of any type of LineItem object.
HTH
Pradeep