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
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I see no issues with this approach, assuming your just using the dummy BO to get data. If you want to use it to update/add/delete data, it will get...er...interesting. Crazy



I used similar techniques for similar reasons (though it took me two years to figure out I could just type in the column names!) and it has worked great.



The single table thing is really only important when writing back to the db. It's pretty common to read all kinds of data into a BO. There are definitely different ways to do this, but not sure about better.



The only thing you might consider is looking into the FillMultipleDataTables method of a BO (static). This loads multiple BOs with one trip to the db and is a good thing to look into if a form is loading slowly. I had a form that was making something like 30 trips to the db when loading, due to a bunch of combos/lists. Switched to using FillMultipleDataTables, so all 30 got loaded at once and that really improved performance.
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