Support Article

Empty row gets added while removing the last item on grid

SA-39000

Summary



Deleting row in Repeat Grid and refresh of screen results in empty row to be added.

Error Messages



Not Applicable

Steps to Reproduce



1. Create a section with Repeat Grid.
2. Add icon to show a menu on click on the grid(Grid page list is data class).
3. On the menu add a delete icon, call the delete action and after the delete action, call an activity-1.
4. Inside the activity-1, add a step to do Obj-Save on the current work object work page.
5. Launch the screen on user portal, add few data to Repeat grid then take the delete action for the last row, refresh the current screen
Actual behaviour: Empty row is added as last item on the grid.

Root Cause

A delete row action is followed by run activity. This approach is flawed as the Activity tries to run on the deleted row. This behavior is as per the design and we expect the page to be there if an Activity is configured to run on it.

Resolution

Perform following local change:

1. Create a JavaScript function that calls the Activity without passing any page reference to it.
2. Remove the run Activity action from the delete menu.
3. Configure run script action in the delete menu to call the JavaScript function.

Published June 6, 2017 - Updated July 27, 2017

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.