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
Marcin KułakowskiMarcin Kułakowski 

Create record on custom object from list view and assign to it selected records from list view

Hi all,
 
I've got that kind of scenario:
1. I have 2 custom objects: RMIssue__c and CR__c
2. They are related to each other by lookup field which is placed on RMIssue__c object
3. I want to create Quick Action button on RMIssue__c list view to create CR__c record and add to it selected records from the list view

What is the best approach to achieve it?
Thank you in advance!! 
Nubes Elite Technologies Pvt. LtdNubes Elite Technologies Pvt. Ltd
Hi Marcln,

You can create the custom button in the following manner –
1. Click on Create >> Objects. Now click on the object for which the custom button needs to be created.
2. In Buttons, Links and Action section, click on New Button or Link
3. Enter Label, Name and Description for the custom button,
4. Select “List button” in display type. Select the behavior as per your requirement; we are selecting “Execute JavaScript” as we are doing a      javascript validation.
5. Select content source (Here we are selecting On Click JavaScript).
6. Now add the functionality which needs to be performed on click of this button.
7. Check syntax and then click on save.

Now, you can see your newly created custom button in the Buttons, Links and Actions section, now we need to add this button to the list view.

Here are the steps to add this custom button to the list view –
1. Click on Create >> Objects. Now click on the object.
2. In Search layout section, edit the list view layout.
3. Here you will see your new button listed in the list box, add this button to the list view and click on save.

Now, if you open your list view for that object, you can see your new button added to the screen as shown below –

User-added image

Thank You,
www.nubeselite.com
Development | Training | Consulting

Please mark this as solution if your problem is solved.