Deleting Records on SF Maintenance Form


Author
Message
Tim Dol
Tim Dol
StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
Right now when you use the standard SF Maintenance Form, the delete functionality removes the record from the database upon confirmation.

I need the ability to mark the record for deletion, plus change when the delete button is enabled. I have no problem enabling/disabling the button based on the editing state but I can't seem to find a way to mark the record for deletion and use the save to commit the changes. Is there a way to do this without creating a new button and handling the delete separately? 

Thanks,

Tim

Ralph Rutschmann
Ralph Rutschmann
StrataFrame User (131 reputation)StrataFrame User (131 reputation)StrataFrame User (131 reputation)StrataFrame User (131 reputation)StrataFrame User (131 reputation)StrataFrame User (131 reputation)StrataFrame User (131 reputation)StrataFrame User (131 reputation)StrataFrame User (131 reputation)
Group: Forum Members
Posts: 69, Visits: 1.3K
Hello Tim,

from the help file:

-------------------------------------
DeleteCurrentRow() - Only Mark As Deleted Sample [VisualBasic]
''' 
''' This sample shows how to mark the current row as deleted
''' in a business object.
'''
'''
Private Sub DeleteCurrentRowSample()
'-- Mark the current row as deleted
Customers.DeleteCurrentRow(True)
'-- At this point the record has only been marked as deleted.
' The CurrentRow will be moved to the next record that is not
' deleted unless the ShowDeletedRecords property is turned
' on within the business object. Now save the changes to the
' server.
Customers.Save()
End Sub
The important part is: 'DeleteCurrentRow(true)'
HTH,
Ralph
 

Tim Dol
Tim Dol
StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
Yes, but you don't have the option to specify this value with the delete button in the standard maintenance form toolstrip. The delete action physically removes the record from the database once you have confirmed the action. I can certainly replace the delete button with my own button and mark the record as deleted but I am looking for something, perhaps in the 'BeforeDelete' event, to set a flag to mark the record for deletion so I can retain the standard SF functionality.

Tim

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
Tim,

At present the MaintenanceFormToolstrip does not have that ability.  You could always hide the Delete button and then create your own in this scenario.  But this is probably a good one for the enhancement list. Smile

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