Setting a list of audited fields at design time


Author
Message
Andria Jensen
Andria Jensen
Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)
Group: Forum Members
Posts: 336, Visits: 497
I have created a base business object which all of my BOs will inherit from.  This will handle among other thing, auditing user changes to data.  For each BO, I need to hold a list of AuditedFields so it know which fields it cares about changes on.  I have this working fine by using the same concept as the RequiredFields collection.  However, I would like for all fields to be checked by default instead of unchecked.  I have the following in the constructor of the base business object, which I thought would work:

If Me.AuditUserChanges And Me.AuditedFields.Count = 0 Then
 
For Each field As String In Me.AllFieldsList.ToArray
   
Dim AuditField As New RequiredField()
    AuditField.FieldType =
Me.FieldDbTypes(field)
    AuditField.FieldName = field
    AuditedFields.Add(AuditField)
 
Next
End If

So basically, I'm just saying if i'm auditing and haven't selected any fields to audit, go ahead and default to audit all of them by adding each field from the AllFieldsList to the AuditedFields collection.  The problem is that when I open any of the inherited BOs in the designer I get the following error message:

A class that inherits from MicroFour.StrataFrame.BusinessLayer must implement the AllFieldsList property.

Any idea what is going on here?  Am I just not using the AllFieldsList collection correctly here?  Is there a better way to accomplish what I'm trying to do?

Replies
Paul Chase
Paul Chase
Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
I just noticed this post and I am getting the same error, I may have had it for awhile as I haven't been in the design surface of a BO in quite some time.

I have a Base BO which inherits from Business layer

Then a Inherited BO this inherits from Base BO

All business object then inherit from Inherited Bo

Paul Chase
Paul Chase
Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
I found my problem. I had some code in the init component that checked the all field list
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Andria Jensen - 17 Years Ago
Andria Jensen - 17 Years Ago
Peter Denton - 17 Years Ago
Andria Jensen - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Peter Denton - 17 Years Ago
Paul Chase - 17 Years Ago
Paul Chase - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Chan - 17 Years Ago
                         These are not framework properties, and technically we have not fully...
Trent L. Taylor - 17 Years Ago
Andria Jensen - 17 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search