Skip to main content

Hi All,

I’m trying to add a workflow command to execute on multiple records on a List page.

I added the command on the List level so it will be visible for multiple selection

 

Attempt 1:

Add the key values from the context

Result:

WF executed only for the last selected record

 

Then I tried several different variable formats and then this error happens. Error is coming from the client and no server call occurs.

Error looks promising but I couldn’t find any documentation regarding how to do it.

Can someone guide on how to add command variables for multiple selection of records?

Tested in 24.1.4

@Lahirumala de Mel

Hi Damith.

 

I’m afraid that when you run a workflow from a command (ExecuteWorkflow), you cannot select a “method” property as you can with ExecuteAction. See below:
 

 

The alternative that you have is to create a custom attribute (FndYesNo). That attribute can be used as selector. Once the user has selected the records save and have a Projection Action or Event Action that triggers the workflow for each of the rows updated with that flag set to true. As a last step, the workflow should set the flag to false.

 

In case you need to handle all records in a single workflow execution because there is data dependency, then have the flag per line but do not trigger a workflow when lines are saved. You will have to have a command that start the workflow. Then the workflow will read all lines with the flag set, then do the processing and as final step set the flags back to false.

 

Let me know if this kind of works for you.

Best regards.
Gonzalo.

 


Reply