Scenario 1:
User is checking the rows in the grid to mark them for deletion, I want to get the number of checked records to do some thing
Solution
Use the buffer_Ds.recordsMarked().lastIndex() to check the number of the records that are marked for deletion.
Scenario 2:
User has marked the multiple records for deletion on the Form, now I want to do some manipulation on the deletion and refresh the Grid or the Form. What should I do
Solution:
Never write the research code in the delete method because the delete method on the Form is called per row and calling research would break this behavior, since research calls the executeQuery(). DeleteMarked() is the good place to write the research code since it is called once if there are multiple records, you should write the research code just after the super() call.
Note: The deleteMarked() method is not called when there is a single record for the deletion.
User is checking the rows in the grid to mark them for deletion, I want to get the number of checked records to do some thing
Solution
Use the buffer_Ds.recordsMarked().lastIndex() to check the number of the records that are marked for deletion.
Scenario 2:
User has marked the multiple records for deletion on the Form, now I want to do some manipulation on the deletion and refresh the Grid or the Form. What should I do
Solution:
Never write the research code in the delete method because the delete method on the Form is called per row and calling research would break this behavior, since research calls the executeQuery(). DeleteMarked() is the good place to write the research code since it is called once if there are multiple records, you should write the research code just after the super() call.
Note: The deleteMarked() method is not called when there is a single record for the deletion.