Custom Properties, Related Tables, Business Binding Sources and Grids


Author
Message
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
I am using a view to populate a grid via the business binding source.  All is well.

Now, I want to populate a grid from a BO that has custom properties.  No big deal.  All is well there, too.

Except, any foreign key fields will not pull data from the appropriate table (BO) reference.  This has probably been asked before, but after reading about a dozen threads on the issue, I am no further to getting a solution than when I started.  Thus, I post.

Here goes...

I have a table with, say, three fields:  colIndex (PK), colDesc, colStatus (FK).
In addition, as declared in the BO, I have a custom property: myCustomProp.

I want to fill a grid with the following:  colDesc, colStatusDesc, myCustomProp.

Please note that colStatusDesc is a field from the foreign table that is related to the main table. 

I cannot create a view, since the custom properties do not exist within the RDBMS.  If I just use the base BO, I do not have access to the foreign table's description field.  Or, do I?

Now, this is a very simplistic example.  My actual grid has several of these foreign key thingies (length unit, inventory unit, statuses, divisions, etc.; also several custom properties, too).  I cannot have parent-child BOs handling all of these relationships.  At least, I do not know of a way in SF to do this.

So, what do I do?

Thanks for any help on this!
Bill

Reply
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Hmmm...Can't say too much about the grid method, as I'm still a newbie with grids (that's about to change...)



However, this approach is what I use to off load work to the db server and limit the number of calls to the db. My limiting factor is usually network latency, as 95% of my users are remote (I'm using Enterprise Server which was a bloody Godsend), so < db calls is good. To increase speed even more, I'd use either a view or a sproc. I guess what I'm saying is that if you need the data for a bunch of FKs, it has to be gotten at some point. This method gets what you need with one call to db, using db server optimizations as needed to increase speed.



Another option might be to cache the FK data, if it doesn't change much, then you'd just get it once. You could still use custom properties in that case, just pull from the cache.



Yep, I spend waaaaaay too much time attempting to decide which of the 100 ways there is to do something that might be the best BigGrin I hope there are some more responses, as these posts are always great for learning more/better ways of doing things.
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