For the managed package runtime, configure an Omniscript to launch from a List button for a related list on a record page.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
-
From Setup, create an Apex class, paste in the following code, and click
Save:
public class tenPageSizeExt { public tenPageSizeExt(ApexPages.StandardSetController controller) { controller.setPageSize(10); } } - From the Omniscript designer, click How to Launch.
-
Copy one of the code examples under Embedded. Edit or remove the prefill parameter
as needed.
For example:
<c--opportunity--updatestatus-english prefill='\{"ContextId":"{!Account.Id}"}' layout="lightning"> </c--opportunity--updatestatus-english> - From Setup, create a Visualforce page and specify a Name and Label.
-
Paste the code copied from the Omniscript between the
<apex:page>and</apex:page>tags.For example:<apex:page> <c--opportunity--updatestatus-english prefill='\{"ContextId":"{!Account.Id}"}' layout="lightning"> </c--opportunity--updatestatus-english> </apex:page> -
Add controller and formatting code to the
<apex:page>tag, then click Save.For example:<apex:page standardController="Opportunity" recordSetVar="opportunities" tabStyle="Opportunity" extensions="tenPageSizeExt"> <c--opportunity--updatestatus-english prefill='\{"ContextId":"{!Account.Id}"}' layout="lightning"> </c--opportunity--updatestatus-english> </apex:page> -
From Setup, click Object Manager and go to the object page
for the object relevant to the Omniscript.
For example, type Opportunity in the search field and click Opportunity.
- From the object page, click Buttons, Links, and Actions.
- Click New Button or Link, specify a Name and Label, and specify a Display Type of List Button.
-
Select Display Checkboxes (for Multi-Record Selection) if
your List button requires users to select individual records in the list.
The related list type must be set to Enhanced List.
- Change the Content Source to Visualforce Page.
- From the Content dropdown, select the Visualforce page you created.
- Click Save.
- From the object page, click List View Button Layout.
- Move the button you created from the Available Buttons list to the Selected Buttons list and click Save.