I have created an autolaunched flow which accepts both single and multiple record ids. Care should be taken that the name of the variables should be exactly id
and ids
respectively.
To call this flow, create a custom button each for detail and list page and add it on the layout pages. So for the detail page, set the id
flow variable to be the account ID, and once the flow is completed, redirect the user to the same account detail page by providing the retURL
parameter in the flow URL.
For the list view page, make sure that Display Checkboxes is selected. The ids
variable is populated automatically when one or more records are selected in the list view page. The only caveat is that once the flow is completed, I couldn't find a declarative way to redirect the user to the same list view page from where the flow was executed (you can use a Visualforce page to redirect to the list view). So for the sake of simplicity, I am redirecting the user to the Recently Viewed Accounts page.
Next, we have to add these buttons. To add the button on the detail page layout,
and to add on the list view page,
You can get the flow and the associated custom buttons files from this repository.
0 comments:
Post a Comment