Skip to main content
I using mozilla firefox 66.0b5 (32-bit) version I add list button ( name of button : save) in list view. In Lightning I  select some records & then i am clicking save button but I am getting blank page after click save button. vf page action attribute onload not working in lightning but I am executing save button from classic it works properly. In google chrome working properly in lightning & classic side both. But in mozilla firefox 66.0b5 (32-bit) & (64-bit) not working.
  • Please refer following action attribute onload code : 

public PageReference createStandOpportunities()

    {

Set<String> numberSet = ParserHelper.getNumberSet();

List<Opportunity> insertOppList = getOpportunityList(numberSet);

        if(insertOppList.size() > 0){

          createOpportunities(insertOppList);           

        }

}

private List<Opportunity> getOpportunityList(Set<String> numberSet){

List<Opportunity> insertOppList = new List<Opportunity>();

for(String eachNumber : numberSet){              

                    Opportunity newOpp = new Opportunity();

                    newOpp.Name = 'Opp-'+eachNumber;                   

                    newOpp.Posted_Date__c = Date.today();

                    newOpp.Data_Id = eachNumber;

                    newOpp.StageName = 'Prospecting';

                    newOpp.CloseDate = Date.newInstance(2080, 1,1);

                    insertOppList.add(newOpp);               

            }

return insertOppList;

}

 private void createOpportunities(List<Opportunity> insertOppList){

try{

            if(!insertOppList.isEmpty()){

               insert insertOppList;

                System.debug('Opportunity inserted.....');

            }             

        }catch(Exception ex){

            System.debug('Ex = '+ex.getMessage()+ ' : '+ex.getLineNumber());

        }

}

 
1 respuesta
  1. 6 feb 2019, 10:59
           My Redirect code

            PageReference pageRef = new PageReference('/lightning/o/'+SOBJECT_TYPE_NAME+'/list?filterName=All');

            pageRef.setRedirect(true);   

            return pageRef;
0/9000