﻿<?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?)  » Refreshing screen to reflect BO changes.</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sun, 13 Sep 2026 05:20:53 GMT</lastBuildDate><ttl>20</ttl><item><title>Refreshing screen to reflect BO changes.</title><link>http://forum.strataframe.net/FindPost9489.aspx</link><description>I have 2 maintenance forms (FormA and FormB), bound to different BO's. For&amp;nbsp;the sake of simplicity, these exist as a 1-1 relationship.&amp;nbsp;FormB can be opened from FormA as a modal dialog as long as the relationship exists. Both these BO's have an ApprovedByID which gets set when the user clicks an approve button that is on each of the forms. I have a custom field property in each of&amp;nbsp;these BO's that&amp;nbsp;resolves the&amp;nbsp;ID&amp;nbsp;&amp;nbsp;and&amp;nbsp;places the&amp;nbsp;name of the person that approved the form and gets displayed on the form as well. What I want to happen is that if FormB is opened on top of FormA and the user clicks the approve button on FormB,&amp;nbsp;have their name persist back to&amp;nbsp;FormA. &lt;P&gt;Here's&amp;nbsp;what I use&amp;nbsp;to set the&amp;nbsp;ApprovedByID from within a separate BO.&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;&lt;P&gt;Public&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; SetApprovedByID(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; empID &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; Int32)&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;' Mark this problem review approved&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.ApprovedByEmployeeID = empID&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;' Check to see if a credit memo is linked to this problem review, if so mark it approved&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Using&lt;/FONT&gt;&lt;FONT size=2&gt; loBO &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; CreditMemosBO()&lt;/P&gt;&lt;P&gt;loBO.FillByProblemReviewID(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;CType&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.ProblemReviewID, Int32))&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/FONT&gt;&lt;FONT size=2&gt; loBO.Count &amp;gt; 0 &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;loBO.ApprovedByEmployeeID = empID&lt;/P&gt;&lt;P&gt;loBO.Save()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Using&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet]&amp;nbsp;&lt;P&gt;The data is being persisted back to the database, but is not reflecting the change on the FormA after FormB is closed. Any help would be appreciated.&lt;P&gt;Thanks</description><pubDate>Tue, 12 Jun 2007 08:56:05 GMT</pubDate><dc:creator>rmoore</dc:creator></item><item><title>RE: Refreshing screen to reflect BO changes.</title><link>http://forum.strataframe.net/FindPost9490.aspx</link><description>After you change the data that makes the custom field property's value change, you need to raise some sort of Changed event so that the bindings know to refresh the data.&amp;nbsp; Basically, create an event called PropertyNameChanged where "PropertyName" is the name of your custom property.&amp;nbsp; You'll need to create it as an event handler like this:&lt;/P&gt;&lt;P&gt;Public Event PropertyNameChanged As EventHandler&lt;/P&gt;&lt;P&gt;And raise the event at the bottom of the SetApprovedByID.&amp;nbsp; That will tell FormA to refresh the controls bound to your custom property.</description><pubDate>Tue, 12 Jun 2007 08:56:05 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>