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
miku1051miku1051 

how to send recordid to controller..???

//inside<apex:repeat>
<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}"/>
                 </apex:actionFunction>

 I also want to send record id like {!oplist.opplineNo.id} on remove image click..how can i send both line number and recordid simontaneously....pl help me with it

Best Answer chosen by Admin (Salesforce Developers) 
vishal@forcevishal@force

Have two parameters and assign the values to each.

 

 

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

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

 

 

---  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}" />
 </apex:actionFunction>

 

 

 

*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.