﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » Saving Child Records Under a Transaction</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 09:15:05 GMT</lastBuildDate><ttl>20</ttl><item><title>Saving Child Records Under a Transaction</title><link>http://forum.strataframe.net/FindPost17925.aspx</link><description>Guys,&lt;P&gt;It's getting late into the day on Sunday and I have been trying to wrap an area of code into a transaction. Now, first up without the transaction everything works fine.&lt;/P&gt;&lt;P&gt;When the transaction is in place, it all SEEMS to work fine. With the exception that it is only saving a single child record.&lt;/P&gt;&lt;P&gt;Now, what I am doing is creating an invoice (with lines) from a job form. Basically creating an invoice record and copying the parts used on the job, to invoice lines. No rocket science. No business rules broken. It all saves fine. &lt;/P&gt;&lt;P&gt;Until I go look at the invoice and there is only the very first invoice line saved. I have been through heaps of other posts and I guess I am falling foul of some IsDirty rule, but I can't see where. For the time being I have removed the transactional code. I would rather it was there though, given that it's invoice production.&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;[codesnippet]&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;Try&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;With&lt;/FONT&gt;&lt;/FONT&gt; Inv&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;.Add()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;.CustomerID = &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;.Job1.CustomerID&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;.SiteID = &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;.Job1.InstallationID&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;.InvoiceDate = &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Date&lt;/FONT&gt;&lt;/FONT&gt;.Today&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;.OrderReference = &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;.Job1.OrderReference&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;.InvoiceTotal = &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;.Job1.TotalJobCost&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;.Status = 1 &lt;FONT color=#008000&gt;&lt;FONT color=#008000&gt;'&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;.Printed = &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;False&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;.Terms = 1&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;.PaymentDue = &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Date&lt;/FONT&gt;&lt;/FONT&gt;.Today&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;.FreeForm = &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;String&lt;/FONT&gt;&lt;/FONT&gt;.Empty&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;.Notes = &lt;FONT color=#a31515&gt;&lt;FONT color=#a31515&gt;"All goods remain the property of "&lt;/FONT&gt;&lt;/FONT&gt; &amp;amp; &lt;FONT color=#a31515&gt;&lt;FONT color=#a31515&gt;" until paid for in full."&lt;/FONT&gt;&lt;/FONT&gt; &amp;amp; ControlChars.CrLf&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;.InvoiceTotal = &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;.Job1.TotalJobCost&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#008000&gt;&lt;FONT color=#008000&gt;&lt;FONT size=1&gt;' BusinessLayer.TransactionBegin("", Data.IsolationLevel.ReadCommitted)&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;.InvoiceNumber = GetNextInvoiceNumber(&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;False&lt;/FONT&gt;&lt;/FONT&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#008000&gt;&lt;FONT color=#008000&gt;&lt;FONT size=1&gt;' If .Save(True) = MicroFour.StrataFrame.Data.SaveUndoResult.Success Then&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;&lt;FONT size=1&gt;Try&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;.JobLine1.MoveFirst()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;&lt;FONT size=1&gt;Do&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;With&lt;/FONT&gt;&lt;/FONT&gt; invline&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;.Add()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#008000&gt;&lt;FONT color=#008000&gt;&lt;FONT size=1&gt;' .InvoiceID = Inv.ID&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;.Partcode = &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;.JobLine1.PartCode&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;.Qty = &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;.JobLine1.Qty&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;.LineTotal = &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;.JobLine1.LineTotal&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;If&lt;/FONT&gt;&lt;/FONT&gt; AlarmInstallation1.NewBuild = &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;True&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;.VATCode = &lt;FONT color=#a31515&gt;&lt;FONT color=#a31515&gt;"E"&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#008000&gt;&lt;FONT color=#008000&gt;' exempt&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;&lt;FONT size=1&gt;Else&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;.VATCode = 1 &lt;FONT color=#008000&gt;&lt;FONT color=#008000&gt;' normal&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Using&lt;/FONT&gt;&lt;/FONT&gt; vcode &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;As&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;New&lt;/FONT&gt;&lt;/FONT&gt; VATCodes&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;vcode.FillByPrimaryKey(.VATCode)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;If&lt;/FONT&gt;&lt;/FONT&gt; vcode.CurrentRowIndex &amp;gt; -1 &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;vatrt += (.LineTotal * vcode.VATRate / 100)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;&lt;FONT size=1&gt;Else&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;vatrt += 0 &lt;FONT color=#008000&gt;&lt;FONT color=#008000&gt;' if the vatcode doesn't exist then we can't calculate it.&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Using&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Select&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Case&lt;/FONT&gt;&lt;/FONT&gt; .Save(&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;False&lt;/FONT&gt;&lt;/FONT&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Case&lt;/FONT&gt;&lt;/FONT&gt; MicroFour.StrataFrame.Data.SaveUndoResult.AbortedWithBrokenRules&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;System.Diagnostics.Debug.WriteLine(&lt;FONT color=#a31515&gt;&lt;FONT color=#a31515&gt;"BR"&lt;/FONT&gt;&lt;/FONT&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Case&lt;/FONT&gt;&lt;/FONT&gt; MicroFour.StrataFrame.Data.SaveUndoResult.Cancelled&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;System.Diagnostics.Debug.WriteLine(&lt;FONT color=#a31515&gt;&lt;FONT color=#a31515&gt;"cancelled"&lt;/FONT&gt;&lt;/FONT&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Case&lt;/FONT&gt;&lt;/FONT&gt; MicroFour.StrataFrame.Data.SaveUndoResult.CompletedWithExceptions&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;System.Diagnostics.Debug.WriteLine(&lt;FONT color=#a31515&gt;&lt;FONT color=#a31515&gt;"CWR"&lt;/FONT&gt;&lt;/FONT&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Case&lt;/FONT&gt;&lt;/FONT&gt; MicroFour.StrataFrame.Data.SaveUndoResult.FailedWithExceptions&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;System.Diagnostics.Debug.WriteLine(&lt;FONT color=#a31515&gt;&lt;FONT color=#a31515&gt;"fwe"&lt;/FONT&gt;&lt;/FONT&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Case&lt;/FONT&gt;&lt;/FONT&gt; MicroFour.StrataFrame.Data.SaveUndoResult.Success&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;System.Diagnostics.Debug.WriteLine(&lt;FONT color=#a31515&gt;&lt;FONT color=#a31515&gt;"amazing!"&lt;/FONT&gt;&lt;/FONT&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Select&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;With&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Loop&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Until&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;.JobLine1.MoveNext = &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;False&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Catch&lt;/FONT&gt;&lt;/FONT&gt; ex &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;As&lt;/FONT&gt;&lt;/FONT&gt; Exception&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Throw&lt;/FONT&gt;&lt;/FONT&gt; ex&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Try&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color=#008000&gt;&lt;FONT color=#008000&gt;&lt;FONT size=1&gt;'Else&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color=#008000&gt;&lt;FONT color=#008000&gt;&lt;FONT size=1&gt;'MessageForm.ShowMessage("Broken Rules:" &amp;amp; Inv.BrokenRules.ToString)&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color=#008000&gt;&lt;FONT color=#008000&gt;&lt;FONT size=1&gt;'End If&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color=#008000&gt;&lt;FONT color=#008000&gt;&lt;FONT size=1&gt;' BusinessLayer.TransactionCommit("")&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color=#008000&gt;&lt;FONT color=#008000&gt;&lt;FONT size=1&gt;' finally mark the job as invoiced so it can't be invoiced again.&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;With&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;.Job1&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;.Edit()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;.Invoiced = &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;True&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;.Save()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;With&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;.Edit()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;.VAT = vatrt&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;.Save()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;With&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;.tsbInvoiceJob.Enabled = &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Not&lt;/FONT&gt;&lt;/FONT&gt; Job1.Invoiced&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Catch&lt;/FONT&gt;&lt;/FONT&gt; ex &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;As&lt;/FONT&gt;&lt;/FONT&gt; Exception&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;MessageForm.ShowMessage(&lt;FONT color=#a31515&gt;&lt;FONT color=#a31515&gt;"Alarm64 Job"&lt;/FONT&gt;&lt;/FONT&gt;, &lt;FONT color=#a31515&gt;&lt;FONT color=#a31515&gt;"An unexpected issue has occurred. An email has been created and sent to Alarm64 Support"&lt;/FONT&gt;&lt;/FONT&gt; _&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;, &lt;FONT color=#a31515&gt;&lt;FONT color=#a31515&gt;"7001"&lt;/FONT&gt;&lt;/FONT&gt;, MessageFunction.OK, MessagingIcon.Information, MessagingSounds.Notify)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=1&gt;SendemailException(ex, &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;, &lt;FONT color=#a31515&gt;&lt;FONT color=#a31515&gt;"7001"&lt;/FONT&gt;&lt;/FONT&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#008000&gt;&lt;FONT color=#008000&gt;&lt;FONT size=1&gt;'BusinessLayer.TransactionRollback("")&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;&lt;FONT color=#0000ff&gt;Try&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=1&gt;[/codesnippet]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Thanks for any ideas.&lt;/P&gt;&lt;P&gt;Geoff</description><pubDate>Mon, 21 Jul 2008 10:43:40 GMT</pubDate><dc:creator>Geoff Hirst</dc:creator></item><item><title>RE: Saving Child Records Under a Transaction</title><link>http://forum.strataframe.net/FindPost17950.aspx</link><description>Well, here is a quick example of how to start a transaction add and then save on a transaction:&lt;/P&gt;&lt;P&gt;[codesnippet]Public Sub SaveOnTransaction()&lt;BR&gt;'‐‐ Start the transaction&lt;BR&gt;MicroFour.StrataFrame.Business.BusinessLayer.TransactionBegin("", "MyTranKey", _&lt;BR&gt;IsolationLevel.ReadCommitted)&lt;/P&gt;&lt;P&gt;'‐‐ Start the try block so that we can roolback&lt;BR&gt;' the transaction if an error is encountered&lt;BR&gt;Try&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '‐‐ Save the business object on the transaction&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.BusinessObject11.Save(True, "MyTranKey")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '‐‐ Commit the transaction&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MicroFour.StrataFrame.Business.BusinessLayer.TransactionCommit("", "MyTranKey")&lt;BR&gt;Catch&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '‐‐ Rollback the transaction&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MicroFour.StrataFrame.Business.BusinessLayer.TransactionRollback("", "MyTranKey")&lt;BR&gt;End Try&lt;/P&gt;&lt;P&gt;End Sub[/codesnippet]</description><pubDate>Mon, 21 Jul 2008 10:43:40 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Saving Child Records Under a Transaction</title><link>http://forum.strataframe.net/FindPost17943.aspx</link><description>Hi Trent,&lt;/P&gt;&lt;P&gt;No broken rules. I looked for that before I posted the message. I sat through 7 iterations of the code to watch them all save without&amp;nbsp;issue.&lt;/P&gt;&lt;P&gt;This is the first time I have looked at transactions with SF so definately prepared to be told I have do something wrong.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Geoff.</description><pubDate>Mon, 21 Jul 2008 10:15:33 GMT</pubDate><dc:creator>Geoff Hirst</dc:creator></item><item><title>RE: Saving Child Records Under a Transaction</title><link>http://forum.strataframe.net/FindPost17937.aspx</link><description>Before I dig into your code, did the child record have any broken rules, throw an exception on the save, etc?&amp;nbsp;</description><pubDate>Mon, 21 Jul 2008 09:20:15 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>