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

how to send recordid to controller..???

<a href="javascript&colon;;" onclick="if(confirm('Are you sure?')){remove2('{!oplist.lineNumber1}');}">


<apex:actionFunction name="remove2" action="{!removeoppline2}" reRender="thePB">
                      <apex:param name="name" value="rono" assignTo="{!proname}"/>

 I also want to send record id like {!} on remove image can i send both line number and recordid help me with it

Best Answer chosen by Admin (Salesforce Developers) 

Have two parameters and assign the values to each.



--- here I have added the second parameter ---

<a href="javascript&colon;;" onclick="if(confirm('Are you sure?')){remove2('{!oplist.lineNumber1}', '{!}');}">



---  Here added one more param to assign the other value to ---

<apex:actionFunction name="remove2" action="{!removeoppline2}" reRender="thePB">
    <apex:param name="name" value="" assignTo="{!proname}" />

    <apex:param name="id" value="" assignTo="{!yourVariable}" />




*Note : I am sending value as blank in both the params because you are actually sending them directly when the function is called, so it will automatically assign them to the variables.