﻿<?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 » Issues  » IncludeInFormSave</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 11:40:53 GMT</lastBuildDate><ttl>20</ttl><item><title>IncludeInFormSave</title><link>http://forum.strataframe.net/FindPost3762.aspx</link><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: #1f5080"&gt;I have three BOs on a SF maintenance form. One of the BOs is used to populate a listview and while it will be modified during the life of the form, it will never need to be saved. The form’s IncludeInFormSaveType property is set to DeterminedByBusinessObject and the&amp;nbsp;BO that&amp;nbsp;should not be saved IncludeInFormSave property is set to False. When I select Save on the form&amp;nbsp;the&amp;nbsp;two BOs that I want saved are but the form&amp;nbsp;doesn’t automatically close. When I attempt to close it I get a “Do you want to save changes message?” The form's AutoShowSaveChangesMessage property = True.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: #1f5080"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: #1f5080"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: #1f5080"&gt;Looking at the source code for BaseForm.OnFormClosing I see that it cycles through the BOs on the form and sets SaveNeeded if the BO is dirty. It seems to me that it should also check to see if the BO's IncludeInFormSave =&amp;nbsp;False and if so, don’t mark it as SaveNeeded regardless of whether it is dirty or not.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: #1f5080"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: #1f5080"&gt;Although I can work around the issue by using the form’s before save event and undoing the changes on the BO that shouldn’t be saved, it seems that the form shouldn’t be marking it as SaveNeeded in the first place. &lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: #1f5080"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: #1f5080"&gt;-Larry&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: #1f5080"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;</description><pubDate>Sun, 22 Oct 2006 11:23:38 GMT</pubDate><dc:creator>Larry Caylor</dc:creator></item><item><title>RE: IncludeInFormSave</title><link>http://forum.strataframe.net/FindPost3770.aspx</link><description>Well, actually this is by design and more than likely will not be changed.&amp;nbsp; The IncludeInFormSave property is for just that...saving via the form Save() methods.&amp;nbsp; This does not mean that the BO will not need to be saved in another context and that is why the BO still updates itself and notices that it needs to be saved.&amp;nbsp; All you need to do to make the BO think there are no changes is the following:&lt;/P&gt;&lt;P&gt;MyBO.CurrentDataTable.RejectChanges()&lt;BR&gt;&lt;BR&gt;or&lt;BR&gt;&lt;BR&gt;MyBO.CurrentDataTable.AcceptChanges()&lt;/P&gt;&lt;P&gt;This will clear any changes and will tell the DataTable that there is nothing that needs to go back to the server. It will also give you a False value when you reference the IsDirty property.</description><pubDate>Sun, 22 Oct 2006 11:23:38 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>