Business Object from Joined Tables


Author
Message
Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
I have many requirements to be able to show on a ListView/Combobox the results from multiple joined tables. (e.g.Show Transactions but join in the Stock Description from a joined file). I have gone through a lot of the threads here to get hints , and have it working fine on a Combobox , but would like to ensure there are no Gotchas for any of the other list types , or maybe there is a better way.

1. Say my data is required from two Tables, Tran and Products, where Products gives the description
2. I have set up a 'Dummy' business Object which will be used for ALL my Joined Tables (Query ? Can I do this with just one Dummy Business Object for ALL my lists)
3. I have a Stored Proccdure which Joins the Tables Tran and Products
4. I specify the Dummy Business Object as the BusinessObjectType  in the PopulationDataSourceSettings 9With a different Stored procedure depending on the  Tables)
(When entering the Columns, I type in the column names as they will not be in the buisness Object when it is initially set up)
5. My main concern is that I am using in effect  a Multi Table Business Object (whereas when Business Objects are being set up they are limited to One Table only) and wonder if this will cause any problems in SF

 

Any comments would be helpful

Reply
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Gerard,



To show a field description you can do any of the following:

1) Add a Custom Field Property to your main BO that will call an Escalar method to get the description and you will use this new field whenever you need to show the description. This will work just fine as long as you are not showing many records since it will do a trip to the database to get the description for every field loaded in the BO, this is no good for reports but when showing few records it is acceptable.



1a) Using the above method, if you need to show many records you can always have a LookupBO in which you will have all the records to be look at for the description and instead of using an Excalar method you will simply LookupBO.Seek() to find the description record and update the Custom Field Property.



2) Another option for reporting or Browse Dialog is to use an SQL View with your JOIN condition and create a BO to map this view, then use your stored procedure to fill this view and this will be the fastest way to get your description fields.



I am sure there are many other ways but those are the ones I use. There are plenty of sample in the forum about using those methods, just search for "Custom Field Property" or "CFP" or "Browse Dialog" and have fun!

Edhy Rijo

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search