Best practice for changing form values


Author
Message
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Ok, here's the posted fix, Andria:

http://forum.strataframe.net/FindPost12258.aspx

And to everyone: I'm doing my best to take your advice and post the updates in the update thread at the top of the forum home page Wink

StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Nope, it hasn't been lost in translation, and I'm in the process of fixing it right now, stay tuned Smile
Andria Jensen
Andria Jensen
StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)
Group: Forum Members
Posts: 336, Visits: 497
I just wanted to make sure you guys know that this is a DIFFERENT issue than the one you linked me to.  That issue is about missing 'End If' statements and this one is about extra 'End If' statements.  The fix that I have does not fix this problem, so it does still need to be addressed.  I just didn't want that to get lost in translation somehow. 
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Oops, Trent slipped a post in while I was writing my post...you weren't responding to me... Oh, the embarrassment Blush
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I was making a joke Tongue



The problem reported about a hundred times in the forms is missing end ifs in a BO designer when the field has alternate values on null.



Then you discover that when you add events to the properties, there are extra end ifs (different bug for sure), so, I was like, you know, er...just saying that we found all those missing end ifs from the first bug Blush
Andria Jensen
Andria Jensen
StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)
Group: Forum Members
Posts: 336, Visits: 497
Wait a second....you linked me back to my post.  And since that's my post, I already have those files which means they didn't fix that issue for me.  Crazy
Andria Jensen
Andria Jensen
StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)
Group: Forum Members
Posts: 336, Visits: 497
Ah, I must have missed the big conversation.  Thanks for the fix.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
So this is were all those missing end ifs went! Tongue
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
This has already been fixed...and talked about a lot lately Smile

Get the fix here: http://forum.strataframe.net/Topic11831-10-1.aspx#bm11844 

Andria Jensen
Andria Jensen
StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)StrataFrame User (406 reputation)
Group: Forum Members
Posts: 336, Visits: 497
Okay, I think maybe I found a bug with this.  When I went in and added the FieldPropertyChanged event, the code generated an extra 'End If' in 4 of my properties.  Turns out these are the only properties set to  'Return Alternate on Null/Set Null on Alternate (value type)' in this business object.  The code it generated looks like the following.  The extra 'End If' is bolded.

''' <summary>
''' NextRunDate
''' </summary>
''' <remarks></remarks>
<Browsable(False), _
BusinessFieldDisplayInEditor(), _
Description(
"NextRunDate"), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
Public Property [NextRunDate]() As System.DateTime
 
Get
    Dim loValue As Object
    loValue = Me.CurrentRow.Item("NextRunDate")
   
If loValue Is DBNull.Value Then
     
Return #1/1/1800#
   
Else
     
Return CType(loValue, System.DateTime)
   
End If
  End Get
  Set(ByVal value As System.DateTime)
   
Dim llRaiseEvent As Boolean = False
   
Dim loRow As DataRow = Me.CurrentRow
   
If value <> #1/1/1800# Then
     
If Not loRow.Item("NextRunDate").Equals(value) Then llRaiseEvent = True
   
Else
     
If Not loRow.Item("NextRunDate").Equals(DBNull.Value) Then llRaiseEvent = True
    End If
End If
    If value <> #1/1/1800# Then
     
loRow.Item("NextRunDate") = value
   
Else
     
loRow.Item("NextRunDate") = DBNull.Value
   
End If
    
If llRaiseEvent Then Me.OnFieldPropertyChanged(Me, New   ABLFacilityBOFieldChangedEventArgs(ABLFacilityBOFieldNames.NextRunDate))
 
End Set

End Property


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