Is it possible to use a transaction on a maintenance form?


Author
Message
fparker
fparker
StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)
Group: Forum Members
Posts: 31, Visits: 199
I have two business objects in a parent/child relationship on a StrataFrame maintenance form.  Can I get them to save within a transaction when the user clicks the Save button on the toolstrip?  Thanks for your help.

Fran Parker

MaxQ Technologies, Inc.

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
If you are referring to the MaintenanceFormToolstrip then no.  There is not an option for the MaintenanceFormToolstrip that indicates that the BO(s) should save on a transaction.  You will have to either do this in code or within your own toolstrip. 

In most cases, when transactions are used it is in an environment where you are already in code adding a lot of records and will be calling the Save() method directly, in which case you can go ahead and save on a transaction.  When in a MaintenanceFormToolstrip situation, in most cases, there are generally few records and not in a high volume or transaction oriented environment....that is why this has never been added. 

Chan
Chan
Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

What if I need to have a small process execute after save my screen records? I want it to be executed only if PrimaryBusinessObject save successfully. However, it this small process fail somewhere, I want to rollback EVERYTHING.

How to do this? Which sample can I refer to?

Thank you

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
Then you need to create a transaction before saving and then save on that transaction.  This is the entire purpose of transaction support.  You can refer to the documentation to help you get started here.

Business Layer -> Common Business object Tasks -> Using Transactional Processing

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