Apex Data Source Action executes many times in Spark 12.0.7 API V1

  • 1
  • Problem
  • Updated 2 days ago
In Spark 12.0.7 API V1 version, every time when I select more than 1 row, Apex Data Source Action is executed with multiple calling to Invocable method.

Additionally, I can't pass a record id array to this Invocable method as well with this error. I found that this issue didn't occur in Skuid's previous versions.

Please help to check.

Photo of Kevin

Kevin

  • 792 Points 500 badge 2x thumb

Posted 5 months ago

  • 1
Photo of Kevin

Kevin

  • 792 Points 500 badge 2x thumb
Hi,

Please help to check this issue. It impacts our current working.

Thanks.
Photo of Mike Dwyer

Mike Dwyer, Champion

  • 4,686 Points 4k badge 2x thumb
More information about how this is set up might be helpful. But "select more than 1 row" suggests a Mass Action on a table.

Pre-Spark, I found that a javascript snippet would execute multiple times on a mass action IF the snippet was called from a Custom button, but only executed once if the button was Run Multiple Actions.

There may be something similar going on here. And maybe, in Spark, the Run a...Snippet action will also run for each row on a Run Multiple button type. Fixing bugs can also create bugs.
Photo of Kevin

Kevin

  • 792 Points 500 badge 2x thumb
Hi,

The issue is similar for Field Editor component on mass action. 
In my screenshot, I expect only one row but it displays 3 rows corresponding to the number of selected rows in the table.

This is a critical issue for us. Please help to resolve.

Thanks.


Photo of Kevin

Kevin

  • 792 Points 500 badge 2x thumb
Hi Skuid,

Please help to resolve this issue. It impacts to our current working.
Photo of Zach McElrath

Zach McElrath, Employee

  • 53,432 Points 50k badge 2x thumb
Kevin, it sounds like you have a Mass Action that is running a "Create new row" action, and then a "Run Data Source Action" after that, is that correct? Can you give us more details about what the sequence of actions is that you are running? 

If you have a Mass Action, it is expected behavior that all actions defined for that Mass Action will be executed for each selected row. If you do not want this to happen, you might need to reconsider how you are building your page, perhaps moving the logic to create this row / call the invocable apex method outside of the Mass Action.