function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MAITREYEE DINGAREMAITREYEE DINGARE 

Button on list view to mass add records to related list (Create new records for the related list object)

Hello All, 

I am very new to the development. I have the following requirement:

Current Scenario:
I have a custom-related list (Promotions) for Accounts and when I create a new record for that related list, it related to the current Account. This is the process that we follow for every single Account to the related list (Promotions).

Requirement:
I need to have a button on the list view page of Accounts. When I select multiple Accounts on the list view and click on that button, I should get the possibility to add those Accounts to the related list (Promotions). I.e. the new related list (Promotions) records should be created for the selected Accounts. 

As I am not a developer, it is difficult to write such a code for me and I did not found any templates which can fulfill this function. 

Any help is appreciated. Thank you in advance.

Thank you!
Maitreyee Dingare
Best Answer chosen by MAITREYEE DINGARE
MAITREYEE DINGAREMAITREYEE DINGARE
Hello All,

I achieved this with Flow. So I created a screen flow with necessary inputs and Lookup to the related list record, and rendered all the selected Accounts using Loop Component. For each record in Loop, I am using the Create Records component to create the related list records. 

Thanks to this link from which I got this idea: https://forcepanda.wordpress.com/2019/03/29/how-to-pass-record-ids-from-list-view-to-a-flow-in-lightning/

Thank you!