Created
December 17, 2022 19:15
-
-
Save sjurgis/d02eda4d64ae5ad93d254e734a1f1f3b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public with sharing class ModalList { | |
ApexPages.StandardSetController setCon; | |
public PageReference init() { | |
List<Id> ids = new List<Id>(); | |
for (SObject i : this.setCon.getSelected()) { | |
ids.add((String)i.get('Id')); | |
} | |
return new PageReference( | |
String.format('/lightning/cmp/c__ModalWrapper?c__ids={0}&c__returnUrl={1}', new String[]{ | |
String.join(ids, ','), | |
this.setCon.cancel().getUrl() | |
}) | |
); | |
} | |
public ModalList(ApexPages.StandardSetController controller) { | |
this.setCon = controller; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page | |
showHeader="false" | |
standardStylesheets="false" | |
title="Redirecting" | |
standardController="Lead" | |
recordSetVar="leads" | |
extensions="ModalList" | |
cache="false" | |
action="{!init}" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment