23
NovBlack Friday Deal : Up to 40% OFF! + 2 free self-paced courses + Free Ebook - SCHEDULE CALL
JavaScript is the dynamic scripting language that performs actions on the client side. With the help of JS, it is possible reducing traffic on the web server. There are two popular Apex functions the Salesforce -
An
Based on the API version 23, it is not possible using
Before we move to the apex attributes, if you are seriously planning to begin your career in Salesforce should think about going for a Salesforce Cloud Course to land their career on the right path.
Attribute name -
This attribute is invoked when the actionFunction is called by the DOM event elsewhere in the page markup. You may use merge-field syntax for method referencing. For example, action = “{save}” references the save method in the controller. When an action is not specified, the page refreshes automatically.
It represents the ID of the omponent that is in focus when AJAX request completes.
It is an identifier that allows the actionFunction component to be referenced by other components in the page.
It is a Boolean value that specifies whether the action associated with the component should happen immediately or not. It does not any validation rules associated with fields on the page. If it is set to true then action happens immediately and validation rules are skipped automatically. If there is no value defined for the attribute then it is set to false by default.
It includes the name of JavaScript function when the function is executed somewhere else in the page markup causes the method specified by action attribute to execute. As soon as the action method completes, the components specified by the reRender attribute are refreshed.
The namespace is used for the generated JavaScript function. The attribute of namespace should be a simple string, beginning with a letter and consists of only letters, numbers, or the underscore character. For example, your app_name_version is supported as namespaces. If no namespace is added to the JavaScript functions that are generated by the
The JavaScript function invoked when the result of an Apex update request completes on the client.
It includes the Boolean value that specifies whether the component is rendered or not on the web page. If not specified, the value is set to true by default.
Attribute name -
It shows the ID of one or more components that are redrawn when the result of the action method returns to the client. The final value can be an individual ID, a comma-separated list of multiple IDs, a merge field expression for the list of the collection of IDs.
It is the ID of an associated component that displays the status of an AJAX update request.
It shows the amount of time in milliseconds before an AJAX request should time out. Meanwhile, we recommend you to go through various Salesforce blogs available on the JanBask Training which may really increase your knowledge and answer your queries related to Salesforce.
Next, we will check the need for action tags in Salesforce.
It is possible creating Visualforce pages by invoking controller methods using AJAX requests. There is the case you want to use AJAX in the Visualforce page so that a particular part of the page can be refreshed and performs specified actions when the user clicks on a button. We can use multiple action tags in this case that are supported by the AJAX request.
This action tag must be called from the client-side event or from a custom JavaScript function. It generally behaves like any other JavaScript function that has the capability to communicate with server methods using the “action” attribute. Keep in mind that action attribute is optional here that should be used when required. This action tag can also refresh the VF function on the client-side event using the reRender attribute.
This action tag adds AJAX support to another Visualforce component and then call the controller method. For example, we wanted to implement the search functionality where we need instant results for each keyword that matches the content. Here, we need to add AJAX support to the InputText that calls a function and returns the needed result.
This action tag acts as the timer on the Visualforce page. It is used to send the AJAX request to the server depending on the time interval. In case, the time span is not specified then it is taken 60 seconds by default.
For example, we want to update the account list in every 5 seconds. It will show every new account on the Visualforce page as soon as added. It is clear from the discussion that this action tag is used for the component that we want to refresh in every few seconds. If you don’t want to refresh the component frequently then you should use
These were the tags required in Salesforce. Now, we will go through the process of passing parameters between Apex and Visualforce.
Tip: The top customer relationship management (CRM) platform in the world is Salesforce. Take this free, 2-minute Salesforce quiz to see how much you know about the platform and to keep up with new developments.
When the user clicks a link, we want to pass the ID to the Apex method. The APEX method then returns to us a URL string. We open a new window here that loads that needed URL. We can call parameters and variables from Visualforce pages but passing parameters or variables to and forth between Apex methods and Visualforce is not intuitive. However, it is impossible passing parameters from a Visualforce page to the Apex method directly.
So, how to pass the ID parameter to the Apex method from the Visualforce page. Well, Apex class is the solution here that help to initialize variables outside the method since parameters cannot be passed from Visualforce page directly. We need to declare actionFunction here that works similar to the Apex method. When you call this action tag, you are free to add multiple parameters between Apex and Visualforce methods here.
Also, consider joining the JanBask Salesforce community to keep yourself updated with the latest Salesforce trends and career opportunities.
With this discussion, you must be sure of what is Apex:actionFunction method and how it helps in multiple ways to invoke controller methods using different action control attributes. There are more similar methods too that are also discussed in brief because the main objective of this blog is to discuss the concept of Apex:actionFunction in detail. To know more about tough Apex methods and controllers, join the Salesforce certification program and learn to use different control tags practically with the right experts’ assistance.
Q1. What is the Apex attribute?
Ans: A description of a custom component's attribute. Only a component tag can have an attribute tag as a child. Please take note that properties with names like id or rendered cannot be defined. All custom component definitions automatically create these characteristics.
Q2. What does Salesforce's apex component mean?
Ans: A designation that enables other tags in the component definition to use the component as a reference. The language that is used to display labels that have Salesforce-related translations. The language of the person viewing the component is superseded by this value.
Q3. How do I use Apex param in Salesforce?
Ans: We have used param twice on the VF page: once in the command button and once in the actionfunction. A value has been assigned to the parameter that is in the command button as well as to a variable in the controller. If the button is clicked, this value will be sent to the controller's variable.
Q4. In Salesforce, how can I use Apex param?
Ans: We have used param twice on the VF page: once in the command button and once in the actionfunction. A value has been assigned to the parameter that is in the command button as well as to a variable in the controller. If the button is clicked, this value will be sent to the controller's variable.
Q5. What do Salesforce's Apex and Visual Force mean?
Ans: Web service requests and triggers on objects can both start Apex code. With the help of the Visualforce framework, programmers may create complex, unique user interfaces that can be hosted natively on the Lightning Platform.
Q6. What is the objective of the Salesforce course?
Ans- This course on Salesforce Admin training online has been prepared as an aid for those students who wish to master the concepts of Salesforce Administration more comprehensively.The Salesforce Admin course online that we have to offer ensures a thorough job success and also aids you to clear the certification exam with all the skills that have been gathered by the aid of carefully customized Salesforce admin training materials and the practical assignments.
Q7. What learning benefits can I get from JanBask Training?
Ans- At JanBask Training-
Q8. Which Salesforce admin certifications are in-demand?
Ans- Salesforce currently offers two stages of administrator certifications:
Both these certifications are designed and necessary for those professionals who wish to focus on Salesforce’s administrative side functions of an already existing Salesforce solution regime.
Q9. Is it tough to get a job in Salesforce?
Ans: Despite the fact that it's not unheard of for someone to land a job with just a Salesforce Certification, most occupations require some sort of relevant work experience. This is the classic "chicken and egg" scenario in which neither experience nor employment can be obtained without the other.
Q10. Which qualification is needed for Salesforce?
Ans: The ideal candidate should be an administrative professional with a BE-A degree and a background in Salesforce. They should also have a BBA, BCA, or MCA. Developers, Administrators, authors, journalists, and analysts can all benefit from the internationally recognized Admin certification.
What are the benefits of doing LIVE sessions in the training program?
Ans- At the first step, we will brush up your skills concerning the fundamentals of Salesforce Service Cloud.
Q10. Can I get access to the class in case I miss it?
Ans- Yes, you can access the same class again in our recorded class sessions. OUR Learning Management System records each live session that can be viewed later when you need it.
FaceBook Twitter LinkedIn Pinterest Email
With his detailed research and unique insights into IT and Technological trends, Shubham has been producing high-quality and engaging content that meets the standards of its end-users.
Cyber Security
QA
Salesforce
Business Analyst
MS SQL Server
Data Science
DevOps
Hadoop
Python
Artificial Intelligence
Machine Learning
Tableau
Search Posts
Related Posts
Receive Latest Materials and Offers on Salesforce Course
Interviews