You need to sign in to do that
Don't have an account?
Avinash Vellala
Thanks
VF page accessed from URL button showing blank
Hi all,
After much struggle I had to resort to posting this question in the community.
This is related to Conga and I am trying to run a VF page from a List View button in Lightning Experience. Below is the code for Controller, VF Page and the button.
Controller
/** * @description Builds list of sObject Ids from recordSetVar and constructs the Conductor URL */ public class GenericConductorFromListViewController { private String urlFieldName; private String partnerServerUrl; private ApexPages.StandardSetController controller; private List<Id> recordIds = new List<Id>(); public GenericConductorFromListViewController(ApexPages.StandardSetController controller) { this.controller = controller; this.urlFieldName = ApexPages.currentPage().getParameters().get('paramURL'); for (sObject sObj : controller.getSelected()){ recordIds.add(sObj.Id); } partnerServerUrl = 'https://'+ApexPages.currentPage().getHeaders().get('Host')+'/services/Soap/u/26.0/'+UserInfo.getOrganizationId(); } public PageReference prepareConductorUrl() { PageReference conductorUrl = new PageReference('https://conductor.congamerge.com?'); conductorUrl.getParameters().put('MOID', String.join(new List<Id>(recordIds),',')); conductorUrl.getParameters().put('SessionId', UserInfo.getSessionID()); conductorUrl.getParameters().put('ServerUrl', partnerServerUrl); conductorUrl.getParameters().put('UrlFieldName', urlFieldName); return conductorUrl; } }
VF Page
<apex:page standardController="Invoice_Number__c" extensions="GenericConductorFromListViewController" recordSetVar="records" > </apex:page>
Button (Type- List Button ,Display Checkboxes ticked, Contenct Source- URL, Behavior - Display in existing window with sidebar)
/apex/GenericCongaConductorListViewButton?paramURL=Generate_Invoice_URL__cI am trying to pass a parameter to the Controller's constructor. When I select the button with a record selected, it goes to a blank page and is stuck there. I am not familiar with Apex nor Visualforce and I got to this point scraping knowledge here and there and I am unable go further. Any help is appreciated.
Thanks