+ Start a Discussion
Maxime SavartMaxime Savart 

Custom Buttom not working : Attempt to de-reference a null object

Hello, 

I'm trying to work on a mass edit button using Mass Manager.

Here is the code I'm using for the custom button dedicated to my custom object "Recouvrement".

<apex:page standardController="Recouvrement__c" extensions="MassManager.ActionHubExtension" recordSetVar="recouvrements">
  <script>
        window.onload = function(e) {
           var recordIds = '{!selected}';
           var Objectname = 'Recouvrement';
           var action = 'Edit';
           var fieldsetName = 'RecouvrementMassEditFieldSet';
          if(recordIds!='')
          {
              Redirect(recordIds,Objectname,action,fieldsetName);
          }
          else
          {
            alert('Please select a record.');
            window.history.back();
          }
            };
      </script>
 <apex:form >
 <apex:actionFunction action="{!Redirect}" name="Redirect" rerender="none">
   <apex:param name="recordIds" assignTo="{!recordIds}" value=""/>
   <apex:param name="Objectname" assignTo="{!objectName}" value=""/>
   <apex:param name="action" assignTo="{!action}" value=""/>
   <apex:param name="fieldsetName" assignTo="{!fieldsetName}" value=""/>
 </apex:actionFunction>
  </apex:form>
</apex:page>

I get the error, attempt to de-reference a null object when using it on a record.

Could you help me with this one? :)

Thanks a lot,
Maxime SavartMaxime Savart
To add, here is the text I get under the error when using it : Error is in expression '{!Redirect}' in page vfp004_masseditrecouvrement: (MassManager)