Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

A component that provides support for invoking controller action methods directly from JavaScript code using an AJAX request. An component must be a child of an component.

0
votes
2answers
12 views

generic timeout for apex:actionFunction

What I'm trying to do is to call function from apex controller on mu VF page with timeout. For this purpose I've decided to add next code <apex:actionFunction name="searchAuthProducts" action="{!...
0
votes
0answers
14 views

Actionfunction doesn't fire the controller

kindly your help about my problem. I'm a newbie in visualforce, and I'm confused why the actionfunction does not fire the controller. VF Page: <apex:form id="formTree"> <div id='divTeam' ...
0
votes
0answers
22 views

ActionFunction not getting called from JS method

So I created a custom lookup to provide a search functionality for a contact insert/edit table. The idea is that the user can "load"an existing contact instead of creating a duplicate in the system. ...
0
votes
0answers
31 views

ActionFunction fails to rerender sometimes

These components are in (TestPage1) Command button in div: <div class="slds-m-top_small"> <apex:commandLink onClick="doSearch()" ...
0
votes
1answer
28 views

Compare What User Typed in VF inputText with JavaScript

In the code below, I need to be able to use JS to call renderResults(); in my controller, only if a user clears the field where customerToClearSearchText goes on the VF page. If I remove the ...
0
votes
2answers
63 views

apex:actionFunction redirecting to URL with only the visualforce page on it

I am calling the actionFunction from javascript. I tried having return false; after the call as is suggested on a couple other questions I found but nothing works. I tried specifying the reRender prop ...
0
votes
1answer
29 views

Pass parameters by checking some condition to apex controller

I am trying to pass parameters by checking some condition inside the Javascript controller. Here's what i am trying to do:- CreateDiscrepancy: function(component, event, helper) { var ...
1
vote
2answers
42 views

how to get which action function is used?

I have these action functions: <apex:actionFunction name="save" action="{!SaveAccount}" oncomplete="executeSD();" status="sub-status"/> <apex:actionFunction name="executeSD" action="{!...
1
vote
2answers
84 views

Action Function Param Not Passing to Controller

EDIT: I needed to put a ReRender, but why? Trying to pass an action function param to the VFP's custom controller. The value is not passing as passedVariableString returns null on the debug. Where am ...
0
votes
1answer
20 views

Need to retrieve values from database without refreshing the entire page

I have a Visualforce page with picklist and associated fields with it. When the picklist value is no I want the other input field values that we have provided to be saved in the database after ...
-1
votes
2answers
24 views

actionFunction doesn't work when not using all the parameters

I'm using the actionFunction to call a method to create payments from my visualforce page. The thing that changes is the payment type (sometimes its cash sometimes its check and sometimes both). The ...
0
votes
2answers
19 views

How to merge 2 similar apex controller method into 1 for 2 different <apex:actionFunction>

I have 2 different apex:actionFunction, one is for save, the other is for saveAndNew: <apex:form > <apex:actionFunction name="save" action="{!save}" status="sub-status"/> <apex:...
0
votes
1answer
27 views

apex:actionFunction not passing the parameters

I am currently trying to call an Apex controller function from an apex:actionFunction, but I can't seem to get the parameters to be passed to the controller function. ActionFunction <apex:...
0
votes
1answer
27 views

Prevent reloading of Page on oncomplete of actionfunction

I have below code where I want to do an action to apex action function and oncomplete of it want to call a javascript function. Unfortunately instead of calling the action the action function in my ...
0
votes
2answers
27 views

actionFunction & html

Trying to find out how to work with actionFuntion in case of usage html instead of VF. My simple piece of code is listed below. Controller: public class Test { public String variable1 {get; set;}...
1
vote
1answer
118 views

apex:ActionFunction not reRendering or showing status

Not sure what is happening here. I am unable to show the spinner status or reRender the page with updated data. I did see this information about reRendering with conditionals but I am reRendering my ...
2
votes
1answer
165 views

Help with Drag and Drop between multiple lists and Save button function with Controller class

I´ve searched around but havent been able to find anything yet. Ive created a field in the Account object called "nivel" which means level. The idea is that every account record can have 3 possible ...
1
vote
2answers
217 views

save two records in two objects with a single save button with lightning components

I have two objects: question and answer, in one form. the first 3 fields belong to the question object. dynamic form belongs to the response object. I created two actions in the client-side ...
0
votes
0answers
24 views

call actionfunction controller method before command button action method

<apex:page showHeader="false" sidebar="false" controller="PartnerRegController" docType="html-5.0" lightningStylesheets="true"> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/...
0
votes
0answers
20 views

actionfunction cannot rerender outputpanel/pageblock

In the code below, the rerender attribute does not work. I have also tried incorporating placeholder outputpanel but to no avail. Am I missing something? Does it have some conflict in html input or in ...
0
votes
1answer
152 views

How to get value after serverside call javascript lightning component

I do a serverside call to get my accounts which returns my accounts. I want to be able to use the returned accounts as a variable to work with. How do I accomplish this. My returnvalue gives me an ...
0
votes
0answers
16 views

Picklist on Page prevents section rerendering/causes full page to reload

I am overriding the new function with a custom visual force page to allow creation of related items while creating the parent. On page page I have a section with picklist in it and then below that the ...
0
votes
2answers
141 views

<apex:actionFunction not calling Apex methods

I am trying to call an apex method from my visualforce page using javascript method. <apex:page docType="html-5.0" showHeader="false" expires="" sidebar="false" title="Connection" controller="...
2
votes
2answers
719 views

How to disable a apex command button

In my VF page I want to disable the command button via Javascript(not through controller). <apex:page id="thepage" standardController="Opportunity" extensions="OpportunityExt"> <apex:...
0
votes
0answers
63 views

Update account records in VF page using action function

I have the following code in my vf page <apex:page controller="Account_Populate_Controller"> <script> function saveAccountName(e){ e.preventDefault(); SaveActionFunction(e); } ...
0
votes
0answers
16 views

is it possible when i clicked on checkbox than allselect and show edit field to save

vf pages <apex:page controller="ActionFunction"> <script type="text/javascript"> function selectAllCheckboxes(obj,receivedInputID){ var inputCheckBox = document....
0
votes
0answers
11 views

is it possible when i click on checkbox contact than display editable field

vf page <apex:outputPanel id="inP"> <apex:outputPanel rendered="true"> </apex:outputPanel> </apex:outputPanel> <apex:...
0
votes
1answer
384 views

Call actionFunction from actionSupport onComplete

I'm trying to execute actionFunction inside the onComplete event of actionSupport. The goal is to get the selected Id from a lookup field and pass it to the Controller via the actionFunction, but I ...
0
votes
0answers
176 views

onChange event on apex:inputField fires only after losing focus

I have written a VF page having <apex:inputField> with a onchange method like this: <apex:inputField value="{!opp[field]}" onchange="resetValues()"/> The method resetValues is a ...
0
votes
0answers
49 views

Rerender only if action returns null?

So I have an interesting little problem. I have a action function in my visualforce page: <apex:actionFunction name="handleShowChanged" action="{!handleShowChanged}" reRender="non-upload-area" /&...
0
votes
1answer
25 views

Need a function to avoid repeating numerical sequence

I need a function to avoid repeating numerical sequence. The PO number in my form is a numbered series and I can not have any number duplication (each PO has a unique number that follows a numerical ...
0
votes
3answers
253 views

Delete Row with confirm dialogbox

In JavaScript function all the alert showing and id is getting but for controller method is show's " DML statement found null SObject at position 0" Exception. Controller public class ...
1
vote
1answer
51 views

How to pass Apex controller variable value in Javascript after ActionFunction Call?

Below is my VF page (only imp content given) <apex:page showheader="false" sidebar="false" standardStylesheets="false" id="page" controller="BAR_ABNCheck_CC" action="{!initDetailPage}"> ...
0
votes
1answer
27 views

Email from action function not being send

I have below action function in vf page <apex:actionFunction name="changeOwnership" action="{!changeOwnership}" rerender="changeOwnershipId" oncomplete="ownerShipChangedComplete()"> and in ...
0
votes
1answer
28 views

Difference in placing script tag below and above actionFunction

I am facing a situation where actionFunction is getting called from javascript when the actionFunction is placed above the script tag. However if their positions are reversed the actionFunction does ...
0
votes
1answer
98 views

ActionFunction not working properly.Values not getting passed to controller

I am facing this dumb issue where PassValues() function is action function and i am passing some parameters to controller through actionfunction.I dont know whats going wrong the code is not flowing ...
0
votes
3answers
106 views

VisualForce having an issue with apex:actionFunction

I have a visual force page. I have two values on this page that I need to pass to its controller. I am able to put these values in hidden fields on the page. I am now trying to use an apex:...
1
vote
0answers
71 views

Rerender causes getter to get called even when it should not

Can anyone explain to me why my list is getting re-populated even when it shouldn't? As you can see in the code, the ActionFunction is inside an ActionRegion and only reRenders an outputPanel with Id ...
1
vote
0answers
53 views

ActionFunction on Sites (guest login) return unauthorized

We have an external site for our clients, and in that site faq section, when we try to use apex ActionFunction the site return unauthorized page. We have tried everything here: ActionFunction on a ...
1
vote
1answer
74 views

Date input fields are not being passed back to the controller

Here is my html: <div class="slds-form-element"> <label class="slds-form-element__label" for="digital-property-name"> <abbr class="slds-required" title="required">*</...
0
votes
1answer
243 views

apex:actionFunction is not firing

Here is the relevant vf markup. I am adding the actionfunction next to the button that I want to call it for. I've also put the action function at the very start of my form and end of the form to ...
3
votes
0answers
79 views

How to pass values between two apex:selectList asynchronously

I'm building a VF that's meant to query for Thing__c. The fields that are meant to be filtered are set in a fieldset. I'm iterating the fieldset rendering an apex:inputField for each and have an ...
0
votes
2answers
425 views

How to rerender output panel on change apex selectList

I want to display different picklist values on selecting another picklist value. So i have put one on change event in the first selectlist and using action function i'm passing the selected attribute ...
0
votes
1answer
32 views

Browser Side vs Client Side data transfer

I have a question on basic browser-server functionality. I am trying to get my JS to see my apex variable resStatusCode which is set to the webservice's res code. public static Integer resStatusCode {...
1
vote
1answer
437 views

Apex Controller Variable value Not Passing to Javascript function

My requirement is: On the click of a command button, I need to call a controller method and set a value to a controller variable. After that assignment is done, oncomplete attribute of actionfunction ...
1
vote
0answers
185 views

DML on page action

I have the following situation in my plate ... On page load, a modal pops up. The modal is invoked on an action attribute in apex:page. The method that is on the action has an upsert operation that ...
1
vote
1answer
114 views

Webservice Callout and DML

I insert object X, do a web call out, and then take the data I get back from the call out to update object X. I found that you can't do DML before a webcallout so I broke this up into two methods and ...
4
votes
1answer
194 views

apex:input with oncomplete

I have an input number and a button which performs an action on the input, and it is working nicely: <apex:input type="number" value="{!addCount}"/> <apex:commandButton action="{!addRows}" ...
0
votes
1answer
78 views

Record update in inline visualforce page

I'm having an inline visualforce page (to load a map) within a section of page layout. My requirement is to update a field in the same record once the page is loaded. I have the inline VF page and the ...
1
vote
1answer
224 views

Controller method is not called second time

I am calling controller function on command button click. This is button: <apex:commandButton value="Add" onClick="addItemToCard('{!$Component.bVAL}', '{!item.Id}'); return false;"/> This is ...