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 

Throwing Null value because some mistake in VF page



I am trying to insert a value in tool1.Search_by_GAN__c = 'linkselected'; But the value is getting null in debug log. it is entering in to the loop but throwing null value. I am sure i did some mistake in the visualforce page  I mentioned something wrong in the value in VF page mentioned below in Red.


VF page:

 <apex:outputLink target="_blank" onclick="callCon('DST');" value="">DST</apex:outputLink>


<apex:actionFunction name="callCon" oncomplete="callCon1();"/>
<apex:param name="firstParam" value="callcon1();" assignTo="{!linkselected}"/>
<apex:actionFunction name="callcon1" action="{!searchLink}"/>



 public String linkSelected {get; set;}

 public PageReference searchLink() {

tool1 = new Tool_Used__c(); 
uList1 = new List<Users_of_Tool__c>(); 

if(linkSelected != null && linkSelected != '') {
system.debug('###### '+linkselected);
tool1.Search_by_GAN__c = 'linkselected';





I think action function syntax is not correct. 


  <apex:action function  name ='', action =''>

        <apex:param name ='' value ='', assignedTo=''>

</apex:action function>

Can you please let me know what would be the action function syntax inmy case please?





try this

 <apex:actionFunction name="callcon1" action="{!searchLink}">

    <apex:param name="firstParam" value="callcon1();" assignTo="{!linkselected}"/>