4

I have the below List Button URL configured in the Account object.

https://myDomain.lightning.force.com/flow/Delete_Records?ListOfIds={!Account.Id}

When I click the button in list view, it should grab all the selected Ids and delete the records.

enter image description here

When I run the flow via button, I am getting the below error.

enter image description here

When I hardcode the Id and test it in the list button URL it works fine. So I am not sure where I am going wrong.

2

1 Answer 1

8

I figured out the issue. In the button URL I don’t need to pass any flow parameters. In the flow, I should have a collection variable called ids. You cannot use any other name other than ids as this is passed by the system automatically.

  1. Create the autolaunched flow and create a collection variable (calld ids) to store the ids.

  2. Loop through the ids one by one.

  3. Get the records from Account based on the ids from the loop variable.

Please refer to my blog for complete solution: https://sfdxtips.wordpress.com/2021/06/17/salesforce-tips-19-mass-delete-records-from-list-view-using-flow-2/

4
  • Hey Krishnamurthy, could you please show how you solved this issue? How does the flow receive the ids from the list view?
    – jdrees
    Commented Mar 4, 2022 at 15:36
  • @jdrees I have updated the answer. Please refer to the blog. Commented Mar 5, 2022 at 4:54
  • You can link to your blog but you still should provide the answer here. Commented Sep 29 at 9:45
  • 1
    salesforce.stackexchange.com/help/promotion : Don't include links except to support what you've written. Links are not a substitute for including information in your answer itself, and the links you include should always be directly relevant to a part of your answer. See also this FAQ on Meta Stack Exchange: Your answer is in another castle: when is an answer not an answer? Commented Sep 29 at 9:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .