Create a collection from business object


Author
Message
Jason Seidell
Jason Seidell
StrataFrame User (153 reputation)StrataFrame User (153 reputation)StrataFrame User (153 reputation)StrataFrame User (153 reputation)StrataFrame User (153 reputation)StrataFrame User (153 reputation)StrataFrame User (153 reputation)StrataFrame User (153 reputation)StrataFrame User (153 reputation)
Group: Forum Members
Posts: 59, Visits: 180
I cannot figure out how to extract a set of information from a SF BO to a collection.  I want seperate objects that I can pass around and change the properties of without having to be tied to one BO, and without any concern of the BO's being written back to the database, or one subroutine navigating the BO and breaking the caller sub b/c it didn't realize the recordset was changed, or having to manually reset the BO back to whatever record I was looking at before.

The closest thing I could find would be to serialize and deserialize all the results into new objects, which I think would work??  But seems to complex, there should be a simpler solution.

Jason Seidell

Programmer/Analyst

Infinedi

Replies
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
You could place the business object within a BusinessBindingSource, which will return separate instances of the business object, each positioned to the appropriate record (the BBS acts like an IBindingListView, which is itself an IList, so you can use it like a collection).  This would allow you to access the business object without worrying about the record changing each time you access a different object.  The added benefit is that changes to these objects can still be propagated back to the database.
Jason Seidell
Jason Seidell
StrataFrame User (153 reputation)StrataFrame User (153 reputation)StrataFrame User (153 reputation)StrataFrame User (153 reputation)StrataFrame User (153 reputation)StrataFrame User (153 reputation)StrataFrame User (153 reputation)StrataFrame User (153 reputation)StrataFrame User (153 reputation)
Group: Forum Members
Posts: 59, Visits: 180
Sweet!!! That is exactly what I needed!!! I knew there had to be a simpler solution.



Your awesomeWink

Jason Seidell

Programmer/Analyst

Infinedi

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