Questions tagged [actionfunction]

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

Filter by
Sorted by
Tagged with
5 votes
1 answer
12k views

OnComplete Javascript to pop up alert and Redirect to a record page

I'm stuck with onclick and oncomplete. looking for a solution on this. I have a controller that simply saves a Case record. I want to display a Message to User that 'Your case is saved with {!caseId}...
AjaySFDC's user avatar
  • 618
2 votes
1 answer
3k views

Action function not rerendering

Here is the visual force page: <apex:page controller="MyNotesController" showHeader="false" sidebar="false" > <apex:includeScript value="/support/console/25.0/integration.js"/> &...
Raghu's user avatar
  • 23
2 votes
0 answers
1k views

How to display alert pop up for inserted record Id and redirect the VF page to another VF page

I have a custom VF page 'HOMEPAGECOMMUNITY'. I would like to Navigate to 'LANDINGCOMMUNITY'. I have a commandButton 'Submit' which is associated with couple of Rerender Id's for PageErrorMessages and ...
AjaySFDC's user avatar
  • 618
3 votes
2 answers
960 views

actionFunction behavior differ for inputCheckbox and inputText

Have some inputText fields and I'm doing some calculations with the values of these(inputFields are inside a pageblocktable, having wrapper items). VF : <apex:actionFunction name="calculateTotals"...
highfive's user avatar
  • 6,241
2 votes
0 answers
61 views

Reload Page for new Page Message

I have below page snippet where after facet execution to "stop" , I need a page reload. Currently it's not happening hence retaining older page message. Can someone please guide me? Page Snippet: &...
Testing_SFDC's user avatar
  • 2,940
1 vote
0 answers
194 views

Display related fields based on change to lookup

This is a simplified example of the problem I'm having, using minimum data. I've created 2 objects, branch and leaf. Each leaf has a lookup to branch. I put a button on the leaf list to create a ...
aging hippie's user avatar
0 votes
1 answer
585 views

apex:inputField breaking onchange binding?

I have an <apex:selectList> whose onchange event rerenders an <apex:outputPanel> through an <apex:actionSupport>. While I was busy celebrating the magic of Visualforce, I noticed ...
Brian Mansfield's user avatar
0 votes
1 answer
187 views

How to write testmethod for geopointe.actionHandler

I have a few classes written that implements Geopointe's action handler, but I don't know how to go about writing a test class for them. All I can find are test classes written for the schedulable ...
Adam H.'s user avatar
  • 743
1 vote
1 answer
1k views

URL Parameters not showing up on browser URL with Action function

I have an action function that fires on a select list change: <apex:selectList label="Select View" id="viewFilter" value="{!viewFilter}" size="1"> <apex:actionSupport event="onchange" ...
NSjonas's user avatar
  • 10.1k
5 votes
1 answer
8k views

apex:selectList always passing older value on onchange..?

I am using apex:selectList..I want to get the value on onchange of the selectlist..But for first time when i am debugging the value..Its blank..ID comes when i change it again(Second time)..But its ...
miku's user avatar
  • 1,761
2 votes
1 answer
886 views

Visualforce component on page - not rerendering after onclick event

I'm attempting to rerender an apex:outputPanel containing a visualforce component. When I click the panel containing the onclick code to call the controller method to change values and rerender, ...
Javan's user avatar
  • 77
2 votes
1 answer
370 views

I am calling apex class method from vf page using actionFunction , but it is not working because of mandatory field

I am calling apex class method from vf page using actionFunction, but it is not working because on my page i am having mandatory fields, so i want that their an error should be shown like "please fill ...
Amit Chaudhary's user avatar
0 votes
2 answers
204 views

Javascript compare set with string in apex page

I have below apex page snippet where javascript fails to execute and errors out whole page because of failing to compare. Can someone help me here? Here intersects come from controller which I checked ...
Testing_SFDC's user avatar
  • 2,940
0 votes
1 answer
180 views

pop up show blank

I have below piece of code where the function opens a new pop up with blank. But it should display headers atleast ( like Account Demographics:). Can someone give an idea why this happens. In a ...
Testing_SFDC's user avatar
  • 2,940
1 vote
1 answer
357 views

Action method is not invoked in Action Method

In my button click, action method is not invoking in action function and directly going to oncomplete method.Below is the code. Controller - function cheValidation(){ callService(); } function ...
user1858588's user avatar
3 votes
1 answer
2k views

Visualforce - ActionFunction and ActionSupport not calling action methods

today i'm having some issues with actionFunction and actionSupport visualforce tag. This is my example page: <apex:page controller="TestLookupActionFunctionCtrl"> <apex:form id="myform"> ...
Marco's user avatar
  • 368
3 votes
2 answers
3k views

Visualforce page reloads itself after actionFunction call

I would like to use the component apex:actionFunction to set a variable from a custom controller but after the call, the Visualforce page reloads itself. :/ I use return false; on the outputLink ...
Oupat's user avatar
  • 733
1 vote
1 answer
774 views

Facing issue in action function

I've this simple VF page, which is populating today's date on change of value of Picklist(Active__c field as mentioned below): This is done with help of action function which refreshes an outputText. ...
curious_techy's user avatar
2 votes
2 answers
429 views

ActionFunction in ActionRegion in Component doesn't work

I'm extracting part of a Visualforce page into a component, however there's one piece of functionality that doesn't come across. Here's a simplified apex snippet: <apex:actionRegion> <...
ricksmt's user avatar
  • 602
0 votes
2 answers
678 views

Auto Save Picklist value onchange

I have an apex page where there is only one picklist field whose value change is allowed by User. Now I don't need a Save button to make the change reflect in system. Instead I need that anytime User ...
Testing_SFDC's user avatar
  • 2,940
2 votes
1 answer
1k views

Controller property set to null after ActionFunction execution

I am having a weird behavior of actionfunction. I have two of them. The problem occurs when clicking on the commandButton. At the end, javascript function testc() is executed, which calls test2() (...
Alex's user avatar
  • 91
2 votes
2 answers
1k views

Pass dynamic component id in actionFunction status field

I have an apex:actionFunction in my VF page which is called from a commandbutton inside an apex:repeat. There is an apex:actionStatus component which should be rendered once apex:actionFunction is ...
Aneesha 's user avatar
2 votes
1 answer
954 views

PageBlockTable reRendering Subtotal Row Improperly On Second ReRender

I am currently having an issue with an apex:pageBlockTable, where I need some dynamic functionality in each row. I am currently trying to recreate a more condensed version of the Quote creation, ...
Programmable Medley's user avatar
1 vote
2 answers
803 views

ActionFunction doesn't fire

I've tried to simplify my problem. I have a component like this: <apex:component controller="GenericLookup"> <apex:includeScript value="{!URLFOR($Resource.jQuery, 'jquery-1.8.2.min.js')}"...
ricksmt's user avatar
  • 602
1 vote
3 answers
4k views

VF Action to Redirect to a Standard Page with Custom Error Message

I have a VF page that produces an Excel file based upon certain products underneath an Opportunity. How would I go about using a VF action to redirect back to the Opportunity standard screen if no ...
Girbot's user avatar
  • 5,445
1 vote
2 answers
1k views

Command button display control

I have two command buttons (say A , B). I want when A is clicked then only B would be shown. When B clicked then it would be hidden again. Is this achievable ? Please find my page below. Page snippet:...
Testing_SFDC's user avatar
  • 2,940
0 votes
1 answer
1k views

multiple function call to apex methods from javascript issue

I am trying to call three action functions from one javascript method and then trying to render some blocks after each action function completes. Some times it calls all the methods and sometimes it ...
balinder's user avatar
0 votes
3 answers
3k views

Call two controller method from a single comandbutton click

what is the best practice to call two controller method from a single commandbutton click. I have a requirement that on single buttonclick, page will navigate to first page and also call add new ...
user59759's user avatar
  • 581
2 votes
1 answer
506 views

Call VF remoting based on action function result

I am trying to create a Case creation form along with drag n drop file attachment to the case. Case creation happens using Action of command button and what I want is if there is any attachment that ...
SEuser's user avatar
  • 1,845
1 vote
2 answers
713 views

Inline editing last updated field is not getting saved

I have a pageblock table where i can do some inline editing. But the last editd field is not getting saved. I need to explicitely click elsewhere after editing the field and then click on save and it ...
user59759's user avatar
  • 581
2 votes
1 answer
7k views

How to use ActionSupport, ActionREgion, ActionFunction all together

I have a requirement, where I have a dropdown fiter. On change of dropdown value, Pageblocktable will be updated. Dropdown field has no Button to excute the event, so it has to be ActionFunction. ...
Noob_NoVoice's user avatar
  • 2,709
1 vote
1 answer
1k views

Action Function not working

I have to upload a file using HTML input file and create a case and attach it to file. I am ablt to acomplish this using Javascript. Now I want to send the case Id to the controller. But I am not ...
user2703132's user avatar
0 votes
1 answer
1k views

Action support rerender not showing Outputpanel

Switching between Radio Option should show and hide Outputpanel. I got this working with following code: <apex:selectRadio id="benefitradioid" required="True" value="{!selectedTargetBenefit}" ...
Salesforce Steps's user avatar
0 votes
1 answer
3k views

Open new Page preference in new window

i want to open new page as new window... in the beginning i used apex:CommandLink and target="_blank" and it worked well. But i want to add validation in java-script so i used in Apex:...
Racheli's user avatar
  • 83
6 votes
2 answers
2k views

ActionFunction rerender messing with Pagereference

I have a javascript method on my vf page which is called by a save button. This method performs some calculations, collects some data, and sends them to the save method in my controller as parameters ...
codeinprogress's user avatar
4 votes
1 answer
4k views

How to create tabs for an apex:tabPanel dynamically with apex:repeat and rerender?

I have an inputfield in my form which is a lookup. When I select a record from the list of lookup records (clicking the small magnifying glass) I am reading the id of that record and querying the ...
codeinprogress's user avatar
5 votes
1 answer
335 views

Solving Race conditions with ActionFunctions

I have had a big problem with race conditions in ActionFunctions corrupting my viewstate. When I call an AF to update one thing, and then click a button to do another, if the second finishes first, ...
Alex H's user avatar
  • 173
2 votes
1 answer
1k views

XMLHttpRequest cannot load visual.force.com as requested origin is mydomainname.my.salesforce.com

XMLHttpRequest cannot load https://mydomainname--c.eu1.visual.force.com/apex/OpportunityOneClickUpdate?id=006D000000ZRwtx. No 'Access-Control-Allow-Origin' header is present on the requested ...
Chirag Mehta's user avatar
  • 1,251
0 votes
2 answers
636 views

trouble with actionFunction

I am using a wrapper class to combine an sObject with a checkbox, then iterating over the wrappers in my list. The first column displays the checkbox, then a repeat tag iterates over a list of strings ...
VeMan's user avatar
  • 75
1 vote
1 answer
893 views

JavaScript executing before controller method finishes

So I have an action function which calls an apex controller method. I call this action function within some javascript at the top of my page and after that call I want to send some information to ...
Louis Pujol's user avatar
  • 1,235
2 votes
1 answer
1k views

Uncheck checkbox using javascript after JS onload

I am pasting a complete code for anyone reference if they like to resolve it.(Just incase they want to know what i could be missing.) NOTE: CaseOwnerChanged__c = Checkbox field type <apex:page ...
awat baratarey's user avatar
1 vote
1 answer
6k views

Do not VisualForce JavaScript onChange and actionSupport work together?

It seems like you can't use VisualForce JavaScript onChange and actionSupport together, because if you use onChange property on inputField then actionSupport onChange wouldn't work. There is here my ...
Patlatus's user avatar
  • 16.5k
1 vote
1 answer
2k views

pressing enter on inputText does not trigger commandButton

<apex:form styleClass="container"> <apex:actionRegion > <div class="col-md-3 col-sm-5 col-xs-5 input-group"> <apex:inputText value="{!searchString}" styleClass="form-...
Grady D's user avatar
  • 619
2 votes
1 answer
2k views

Upload a file using <apex:actionFunction> integrated with JQuery

I have an html form that contains a file input, so I want to upload the selected file from this form using <apex:actionFunction> The problem is that I don't know how to pass the file to the ...
hasan.alkhatib's user avatar
4 votes
1 answer
3k views

commandbutton not running action function after reRender

So I have commandButtons being displayed through a apex:repeat and being given a variable value in the repeat. When the button it clicked, I have it going to the controller and assigning the values ...
huntonas's user avatar
3 votes
4 answers
1k views

Page does not redirect when using the action param

I am getting the error when am redirecting from the javascript it show the cross domain issue.
Lemon's user avatar
  • 895
3 votes
2 answers
3k views

Get the SObjectType of a record in Visualforce - is it possible?

I have a generic VF component that renders Action Links for records of arbitrary SObject types. Iterating over SObjects in variable record I would like to use such a generic expression in my page: {!...
Robert Sösemann's user avatar
0 votes
2 answers
3k views

How to call action function method in the test class

How do I call a method in my test class which is basically been called from the action function on the vf page? VF page: <button type="button" onclick="myJSMethod();">my button</button> ...
codeinprogress's user avatar
5 votes
2 answers
3k views

apex:actionFunction with apex:param Param not setting

I'm trying to set a controller property, using apex:param in an actionFunction but the properties aren't being set. This is my actionFunction: <apex:actionFunction action="{!setStartEndDates}" ...
Jess's user avatar
  • 472
2 votes
2 answers
3k views

Javascript action function not working after Summer 14 release

I have a VF page with a command button. It calls a javascript function, and then an actionFunction to call a method in the apex class. Everything was working fine until summer'14 release. Now, when ...
sfdcFanBoy's user avatar
  • 4,054