You need to sign in to do that
Don't have an account?

How to create a button that does not require selecting items on list?
<apex:page standardController="PaymentExport__c" tabStyle="DemoPage__tab" showHeader="true" recordSetVar="pex" extensions="DemoPageController"> <apex:sectionHeader title="Payments" /> <apex:ListViews type="PaymentExport__c" > <apex:facet name="header"> <apex:form > <div style="text-align: center; padding-top: 1px"> <apex:commandButton value="New Payment" action="{!create}" id="btnSave" / > </div> </apex:form> </apex:facet> </apex:ListViews> </apex:page>
I have New Payment button in header of listviews but it asks to select a row.
Can I do something about that?
I think that is due to the commandButton being embedded within a ListView component. The error is inferring that the button is acting on behalf of a list.
Try moving the commandButton before the apex:Listviews component. Worth a shot. If not, can you please post your controller's constructor? Thanks.