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?
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search