function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Carly Probasco 14Carly Probasco 14 

System.Debug a null variable!

I am debugging a visualforce page and receiving an error in the code below. the debug tells me this |USER_DEBUG|[119]|DEBUG|from getter is null, here is the code 119 references. 
public String DymanicRerateButtonText{
        get{
            system.debug('from getter is '+DymanicRerateButtonText);
            
            return DymanicRerateButtonText;
        }
        set;
    
    }
    
    public String DymanicRerateButtonURL{
        get;
        set;
    
    }
    
    public Boolean renderDynamicRerateButton{
        get;
        set;
    
    }

 
Christan G 4Christan G 4
Hi Carly, when possible, can you please post the line of code within the VF page that corresponds to these methods? Thanks in advance
Carly Probasco 14Carly Probasco 14
Hi Christan,
Here are the VF page references. thank you for your help!

 
}
      
      function requestReratecheck(){
          var dynamicRerateURL="{!DymanicRerateButtonURL}";
          console.log('dynamic url is '+dynamicRerateURL);
          var dynamicRerateText="{!DymanicRerateButtonText}";
          if(dynamicRerateURL){
              if(dynamicRerateText=="Appeal"){
                  launchAppealForm();
                  return false;
              }
          }else{
              $('#RequestRerate').modal({backdrop: 'static',keyboard:false, show: true});
              return false;
          }
      
      }


 
<!-- Rating history-->
                  <div class="tab-pane fade" id="ratingHistory" aria-labelledby="ratingHistory-tab">
                     <div id="ratingHistoryTable">
                        <h1 class="pull-left">Rating History</h1>
                        <apex:form >
                           <apex:actionFunction name="launchAppealForm" action="{!launchAppealDetail}"/>
                           <div class="pull-right">
                              Available Actions:&nbsp;
                              <apex:outputPanel rendered="{!renderDynamicRerateButton}" layout="none">
                                 
                                 <apex:outputPanel rendered="{! AND(DymanicRerateButtonText!='Appeal',DymanicRerateButtonText!='Renewal') }">
                                   
                                    <a onclick="return requestReratecheck()" href="{!DymanicRerateButtonURL}" class="btn btn-secondary">{!DymanicRerateButtonText}</a>&nbsp;
                                 </apex:outputPanel>
                                 <apex:outputPanel rendered="{!DymanicRerateButtonText=='Appeal'}">
                                    <apex:commandLink reRender="scripts" value="Appeal" action="{!launchAppealDetail}" oncomplete="launchAppeal()" styleClass="btn btn-secondary"/>
                                 </apex:outputPanel>
                                 <apex:outputPanel rendered="{!DymanicRerateButtonText=='Renewal'}">
                                    <apex:commandLink value="Renewal" action="{!processRenewalAction}" styleClass="btn btn-secondary"/>
                                 </apex:outputPanel>
                              </apex:outputPanel>
 
function requestReratecheck(){
          var dynamicRerateURL="{!DymanicRerateButtonURL}";
          console.log('dynamic url is '+dynamicRerateURL);
          var dynamicRerateText="{!DymanicRerateButtonText}";
          if(dynamicRerateURL){
              if(dynamicRerateText=="Appeal"){
                  launchAppealForm();
                  return false;
              }
          }else{
              $('#RequestRerate').modal({backdrop: 'static',keyboard:false, show: true});
              return false;
          }
      
      }

 
Christan G 4Christan G 4
Hi Carly, I hope you are well. I didn't see any input text fields within your code which is why I think you are getting this error. Unless you have initialized your variables from the beginning, all your values remain as null. May I ask, what type of functionality are you trying to achieve?