Skip to main content
Nintex Community Menu Bar
Question

Call action sequence from mass action


Forum|alt.badge.img+8

I have an action sequence that I’m using as a row action today. It works flawlessly.

I’d like end users to be able to multi-select rows and run the action sequence on each row.

For the action sequence to work, I pass in the DocumentId from the Document__c field to a named input called “document”. That works without issue as a row action.

Here’s the javascript I created to loop through each selected row. It appears the action sequence runs but there is now Id passed to the “document” named input.

Any guidance on changes I can make would be greatly appreciated.

var params =arguments[0];
var $ = skuid.$;
var models = skuid.model.map();

// Get the Document IDs from each selected record
var Ids = skuid.$.map(arguments[0].list.getSelectedItems(),function(item){
return item.row.Document__c;
});
console.log(Ids);

// Loop through each record to download the attachments/documents
$.each(Ids,function(i,row){
var namedInputs = {
“document” : Document__c,
};
skuid.actionSequences.getByName(“DocumentDownload”).run(namedInputs);
});

Translate
Did this topic help you find an answer to your question?

3 replies

Forum|alt.badge.img+8

^ bumping this one for visbility

Translate

Forum|alt.badge.img+17
  • Nintex Employee
  • 3763 replies
  • July 12, 2024

Ok. This is a hack.

You can make a mass action that updates a UI Only field (Boolean to true). And then use a model “Row update” action on that UI only field to trigger the action sequence. This essentially queues up a series of row actions and runs them sequentially. It might not be a performant as a batched process, but allows you to reuse your current action sequence.

Translate

Forum|alt.badge.img+8

I tried this hack, but unfortunately, the row that triggers the action sequence does not stay in context.

I must pass an Id from each row back to a named input within the action sequence. It’s running the action the correct number of times but is using the Id from the first row for the value of each named input.

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings