Work with Transactions


Author
Message
Malcon
Malcon
StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)
Group: Forum Members
Posts: 28, Visits: 93
I'm having a problem and questions regarding the transaction control of SF.
In the case below, if the present boOrdemdeServico (Business of Service Orders) mistake, he should not have to deal, or not save the boMateriaisOS (in english Products of Service) and boServicosOS (Services from Service Order) of the Service Orders?

In this case, the BoOrdensDeServico return "SaveUndoResult.AbortedWithBrokenRules
" in Save method.     

Below, my code:

                    try
                   {
                        BusinessLayer.TransactionBegin("", IsolationLevel.Unspecified);
                        AjustaMateriaisServicos();
                        boOrdensDeServico.Save(true);
                        boMateriaisOS.Save(true);
                        boServicosOS.Save(true);
                        BusinessLayer.TransactionCommit("");
                    }
                    catch(Exception ex)
                    {
                        BusinessLayer.TransactionRollback("");
                        Log.LogInfo(ex);
                    }

What am I missing?
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Malcon.

This is a good post on the subject:

http://forum.strataframe.net/FindPost3038.aspx
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