AllowMultipleModifiedRecords problem


Author
Message
Sam Tenney
Sam Tenney
StrataFrame User (140 reputation)StrataFrame User (140 reputation)StrataFrame User (140 reputation)StrataFrame User (140 reputation)StrataFrame User (140 reputation)StrataFrame User (140 reputation)StrataFrame User (140 reputation)StrataFrame User (140 reputation)StrataFrame User (140 reputation)
Group: StrataFrame Users
Posts: 70, Visits: 3.5K
I need to allow the end user to delete several specific records from a table using a maintenance form toolstrip before any of those deletions are propagated back to the database.  Then when they click the Save button, I need all of the deletions to be sent to the database all at once.

I set the maintenance form toolstrip property named AllowMultipleModifiedRecords to True and I made sure the business object's property named IncludeInFormDelete was set to True.  Unfortunately each deletion is propagated to the database as soon as the user clicks the Delete button and confirms that they want to delete the record.

I stepped through the StrataFrame code and I have found that the problem is in the cmdDelete_Click subroutine in the maintenanceformtoolstrip.vb file.  That method checks the business object's EditingState and only sets llRemoveAtServer to False if the EditingState is not Idle.  I do not understand why the editing state is being tested at all.

Is this another bug?  Is there a simple workaround?

Sam Tenney
Replies
Dustin Taylor
Dustin Taylor
StrataFrame Team Member (938 reputation)
Group: StrataFrame Users
Posts: 364, Visits: 771
Sam,

I got an e-mail notification from you with no content. Was there something else you needed here?

Thanks,

Dustin
Sam Tenney
Sam Tenney
StrataFrame User (140 reputation)StrataFrame User (140 reputation)StrataFrame User (140 reputation)StrataFrame User (140 reputation)StrataFrame User (140 reputation)StrataFrame User (140 reputation)StrataFrame User (140 reputation)StrataFrame User (140 reputation)StrataFrame User (140 reputation)
Group: StrataFrame Users
Posts: 70, Visits: 3.5K
Hi Dustin,

Sorry about the empty email.  I intended to point out several other problems with that subroutine, but I accidently sent it before describing the problems.  Now I don't have sufficient time today to fully explain the problems, but I can quickly mention that scanning through all business objects without checking the forms property named "IncludeInFormDeleteType" seems wrong to me.  Perhaps the form's subroutine named "GetListOfDeleteBOs" could be used to limit the scanning of uninvolved business objects.  Actually we could probably replace all the code in the cmdDelete_Click subroutine with the following code because "_AllowMultipleModifiedRecords" is associated with the maintenance form toolstrip and is not affected by any business object.  Here is the entire code (it is just an untested idea from a beginner):

Me.ParentForm.Delete(_AllowMultipleModifiedRecords)

I can provide a detailed argument and analysis tomorrow if you are interested.

Sam Tenney
Sam Tenney
Sam Tenney
StrataFrame User (140 reputation)StrataFrame User (140 reputation)StrataFrame User (140 reputation)StrataFrame User (140 reputation)StrataFrame User (140 reputation)StrataFrame User (140 reputation)StrataFrame User (140 reputation)StrataFrame User (140 reputation)StrataFrame User (140 reputation)
Group: StrataFrame Users
Posts: 70, Visits: 3.5K
Oops,

I meant:

Me.ParentForm.Delete(_AllowMultipleModifiedRecords, True)

Sam Tenney
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