anusha(salesforce developer)

Monday 20 March 2017

Example code for Action function ?

<apex:page controller="AccountSearch">
    <script>
         function javascriptfn(){
             alert('shall i Process');
             actionfun();// actionfunction name
         }
    </script>
    <apex:form >
        <apex:actionfunction name="actionfun" action="{!search}" rerender="out"/>
        <apex:pageBlock >
            <apex:outputPanel onclick="javascriptfn()">
                Enter account Name: <apex:inputtext value="{!name}"/>
                
            </apex:outputPanel>    
            <apex:outputPanel id="out">
                <apex:pageBlockTable value="{!conlist}" var="c">
                    <apex:column value="{!c.name}"/>
                </apex:pageBlockTable>
            </apex:outputPanel>
        </apex:pageBlock>
    </apex:form>
</apex:page>

1 comment:

  1. Very Impressive Salesforce tutorial. The content seems to be pretty exhaustive and excellent and will definitely help in learning Salesforce course. I'm also a learner taken up Salesforce training and I think your content has cleared some concepts of mine. While browsing for Salesforce tutorials on YouTube i found this fantastic video on Salesforce. Do check it out if you are interested to know more.https://www.youtube.com/watch?v=KKVniZdZVW0

    ReplyDelete