Unhandled BusinessLayerException


Author
Message
Sam Tenney
Sam Tenney
StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)
Group: StrataFrame Users
Posts: 70, Visits: 3.5K
Something really basic is not working correctly in the StrataFrame code.  When there is only 1 record in a table and that record is deleted using the Delete button on a standard Maintenance Form, an unhandled BusinessLayerException occurs.

Sam Tenney
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Sam.

I have just tested this situation and haven't had any error from it.

You sure there isn't any code you run on Navigated that is not checking if BO is empty?
Sam Tenney
Sam Tenney
StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)
Group: StrataFrame Users
Posts: 70, Visits: 3.5K
Hi Ivan,

I am running version 1.7.3.1. and I am not doing anything like you suggested.  Are you maybe running a modified or newer version?  This is so basic and repeatable that I am really surprised that you are not seeing the same problem I am seeing.

Sam
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
No Sam, I am on the same version. Tested on a simple form here and nothing wrong happened.

Would you like to create a small sample using the StrataFrame Sample database reproducing the error and attaching it over here?
Edited 14 Years Ago by Ivan George Borges
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Well, if you do what I asked you you will have to delete all records from Customers, for example, to be able to test it with only 1 record... maybe if you make a backup first.
Sam Tenney
Sam Tenney
StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)
Group: StrataFrame Users
Posts: 70, Visits: 3.5K
Ivan,

I am still very much a beginner and I am not sure I know how to make a backup first or how to post my test solution up here as you say, but I will go to work and try to learn those things and then I will get back with you.

Sam
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Don't worry, we go step by step. It really looks like you have code somewhere that is making reference to the BO. It could be the Navigated, but you said you have none. Maybe the EditingStateChanged or somewhere in the BO. Have you got the stack trace? That would probably give you the clues to where you could check. Just so that you "see" it is working, I produced a small video showing the test I did here. Donwload and unzip the file attached.

Anyway, if you find it, you should add something like this:

        If Me.MyBO.CurrentRowIndex < 0 Then
            '-- do whatever to avoid making reference to the BO, since it is empty
            Exit Sub
        EndIf

Attachments
Delete1Record.zip (70 views, 8.00 MB)
Sam Tenney
Sam Tenney
StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)
Group: StrataFrame Users
Posts: 70, Visits: 3.5K
Ivan,

I think I have discovered why your test works correctly and mine does not.  But I think this still MAY be a bug in StrataFrame.  If you determine it is not a bug, then could you explain why changing a property value causes this problem.

The MaintenanceFormToolStrip has a property named AutoManageIsDirtyChangedEvent.  If that property is set to True, the exception occurs.  If I set it to False, no exception occurs.  After ready the description of that property I THINK I want to set it to True.

I have attached my stack trace.  Notice all the pertinent code is unmodified StrataFrame code.

Sam
Attachments
DeleteOneRecordStackTrace.txt (90 views, 2.00 KB)
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)Strategic Support Team Member (2.9K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Well, Sam, I never said it wasn't a bug. It might be, and if so, it will be corrected. 

I only happened to test here the scenario you first posted. To be honest with you, I had never touched the AutoManageIsDirtyChangedEvent, and have just had a look at it. It has been introduced on version 1.7.0.6, as we can see in the help file.

Following now with another test, I have changed the MaintenanceToolStrip AutoManageIsDirtyChangedEvent property to true, and the BO ManageUIReadOnlyState to False, as the help suggests, otherwise there won't be any effect. Again, no error.

Don't get me wrong, I do believe you are getting the error, I just have not succeeded on reproducing it. That is why a sample application could help, we would be testing the same code.
Sam Tenney
Sam Tenney
StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)
Group: StrataFrame Users
Posts: 70, Visits: 3.5K
Ivan,

It looks like I will need to learn how to send you my application before we will be able to resolve this issue.  I will work on that.

Greg McGuffey had told me that most developers are beginning to use the automatic editing mode rather than requiring the end users to click the Edit button to begin editing a record.  So I have tried to find and set all the settings required to enable automatic editing mode but apparently I had missed the ManageUIReadOnlyState property on the business object.  However even after setting it to False as you did, I am still getting the unhandled exception.  Is there a list available of all the settings necessary to enable automatic editing mode?

Sam
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