• Fernand
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
I created a visualforce page with a simple save action and it just works fine.
However when I added recordSetVar, the save/quicksave actions don't seems to work anymore.
<apex:page standardController="Account" recordSetVar="accounts">
    <apex:form >
        <apex:pageBlock >
        <apex:pageMessages />
        <apex:pageBlockSection >
            <apex:inputField value="{!account.name}"/>
            <apex:commandButton action="{!QUICKSAVE}" value="SAVE!"/>
        </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

can you please point out what did I miss?

 
<apex:page id="pg" sidebar="false" showHeader="false" standardStylesheets="false" applyHtmlTag="false" 
    controller="MultipleSalarySlips" renderAs="{!if(isRender == true, "PDF", '')}">
    <html>
        <head>
        </head>
    <apex:form id="frm">
        <table style = "margin-left: 560px;border: 2px solid;padding: 19px;border-radius:5px;background-color:#f1d1bf;display:{!if(isRender == true, 'None','')}" id = "firstTable">
            <!--Table 1 code-->
        </table>
        

        <table style="width:100%;margin-top: 50px;border-collapse: collapse;page-break-after:always;">
                  <!--Table 2 code with repeate-->
        </table>
public with sharing class MultipleSalarySlips {
    public String selectedToMonth{get;set;}
    public String selectedFromMonth{get;set;}
    public String selectedToYear{get;set;}
    public String selectedFromYear{get;set;}
    public List<Monthly_Salary_Details__c> monthlySalaryDetails{get;set;}
    public List<WrpSalaryDetail> wrpSalaryDetails{get;set;}
    public Monthly_Salary_Details__c msd{get;set;}
    public Boolean isRender{get;set;}
    public static Integer iq = 1;
    
    public MultipleSalarySlips(){
        wrpSalaryDetails = new List<WrpSalaryDetail>();
        msd = new Monthly_Salary_Details__c();
        isRender = false;
    }


Hi,
I am facing very unusual and silly issue. I have a vf page with render as pdf based on a condition. The page contains two tables. I am hiding first table conditionally so that second table can generate with proper pdf format. Here is what should happen: On button click of first table a new tab should open and first table should be hidden and second table should be visible in pdf format. What happens is a new tab opens but first table does not get hidden as the condition (isRender remains false) remains true. Above is the code for more understanding.

 
I created a visualforce page with a simple save action and it just works fine.
However when I added recordSetVar, the save/quicksave actions don't seems to work anymore.
<apex:page standardController="Account" recordSetVar="accounts">
    <apex:form >
        <apex:pageBlock >
        <apex:pageMessages />
        <apex:pageBlockSection >
            <apex:inputField value="{!account.name}"/>
            <apex:commandButton action="{!QUICKSAVE}" value="SAVE!"/>
        </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

can you please point out what did I miss?