Multipul forms and BO's with a ShardDataTableKey


Author
Message
Scott
Scott
StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
I have run into a problem using the ShardDataTableKey property on BO's.  I created a SFUser control with a ContactBO on the control, tied to the various controls.  The ContactBO on the usercontrol has its ShardDataTableKey set to 'ContactInfo'.  I then create a new SFStandardForm,  drop a ContactBO on the form, set its ShardDataTableKey to 'ContactInfo', drop the user control with the contact informaiton on it.  Run the form.... works great, the BO on the form and the BO on the usercontrol are one and the same and all the logic built into the user control works.

Open one form, select contact1, open form two, select a different contact... the contact data in now the same in both forms.  I can see that this is exactly what the ShardDataTableKey should do....  how should I handle this type of situation?

Replies
Scott
Scott
StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
Just for clairification,  the BOTranslation collection should no longer be used,  right?

The only thing that is shared is the DataTable, NOT the bussiness object and it properties like the BOTranslation did?

BO Properties (includeinformadd, includeinformedit... etc) need to be set on both business objects to function correctly?

Thanks
Scott

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Just for clairification,  the BOTranslation collection should no longer be used,  right?

There is nothing wrong with using the BO Translation collection whatsoever.  However, there may be times that it may work better for you to use the shared data table property.  But the BOTranslations collection can still be used and is in fact something I use often.

The only thing that is shared is the DataTable, NOT the bussiness object and it properties like the BOTranslation did?

Correct.  When you use a shared data table the business objects are two different instances unlike the BO Translations.  When you use the BOTranslations the actual business object referenced in both locations becomes the same instance.

BO Properties (includeinformadd, includeinformedit... etc) need to be set on both business objects to function correctly?

For most cases you are correct...but just keep in mind that there may be a need to set the properties on both since the shared data table shares ONLY the data table used within the BO and not the properties since they are two separate instances.

BTW...I am sorry it took so long to respond.  I just noticed that this item was overlooked somehow Blush

Scott
Scott
StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
Not a problem,  Thanks for the clairfication.

Scott

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
No problem...I am just glad that I saw the post!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Scott - 19 Years Ago
StrataFrame Team - 19 Years Ago
Scott - 19 Years Ago
StrataFrame Team - 19 Years Ago
Scott - 19 Years Ago
                         [quote] Just for clairification, the BOTranslation collection should...
Trent L. Taylor - 19 Years Ago
                             Not a problem, Thanks for the clairfication. Scott
Scott - 19 Years Ago
                                 No problem...I am just glad that I saw the post!
Trent L. Taylor - 19 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search