8

You can find full details of the order of execution for Visualforce pages at: http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#CSHID=pages_controller_lifecycle.htm|StartTopic=Content%2Fpages_controller_lifecycle.htm|SkinName=webhelp Some things are unexpected, in that getters can execute more than once when the page is being rendered - ...


7

The constructor is called when a page using the controller is first viewed (unless you've just come from another page that uses the same controller). Getters are called as the page is rendered to fill in information, then actions are typically fired after in response to a button press or similar. <apex:actionPoller> renderes every n seconds where you ...


5

The last value in the case is the "default value", in other words, for any value not already in the case statement. Therefore, it should look like this: CASE(Lead_Source__c, "Self Generated", IF(Markup__c >= 0.35 && Markup__c <0.40, 5, IF(Markup__c <0.50, 8, IF(Markup__c <0.60, 11, IF(Markup__c <0....


4

You used a self closing input. You need to leave it open to nest the actionSupport under it. Incorrect <apex:inputField ... /> <apex:actionSupport ... /> Correct <apex:inputField ...> <apex:actionSupport ... /> </apex:inputField>


4

In the thread @sfdcfox have provided several good points.Posting some of them which are related to your answer: @RemoteAction methods require less bandwidth, and server processing time, because only the data you submit is visible and the view state is not transferred, while apex:actionFunction has to transfer the page view state. There is almost always "one ...


4

It's definitely a bug in the new flow designer. It's not because of Sum19 release. I also faced a similar issue recently in Spring 19 scratch org and when switched back to legacy flow builder, I was able to add invocable action in flow. This link also reports the same issue. https://success.salesforce.com/answers?id=9063A000000E47kQAC I wasn't able to find a ...


4

I changed my actionFunction to the following, and all is well :) <apex:actionFunction name="deleteThing" action="{!deleteAttachment}" reRender="none" oncomplete="remove_deleted_thing('{!selectedAttachmentId}') <-- HERES THE CHANGE"> <apex:param name="thingToDelete" value="" assignTo="{!selectedAttachmentId}" /> </...


3

You need to set a return value of false on complete of the actionFunction try: <apex:actionFunction name="doSubmit" action="{!submit}" oncomplete="return false;" />


2

Wild guess (you still need to post more code) but rerender only applies to child elements and not the element itself. For example if you rerender: <apex:outputText id="output" rendered="{!condition}" value="text" /> it won't work. But if you change it to(with output panel): <apex:outputPanel id="output"> <apex:outputText rendered="{!...


2

You can write different handle for this situation. You can do something like j$(document).ready(function(){ j$(".apexaccountautocomplete").focusout(function() { if (j$(this).val() == '') { jsApplyFilter("''") } }); j$(".apexRepautocomplete").focusout(function() { if (j$(this).val() == '') { ...


1

The code exactly as posted (with the duplicate markup removed, the custom object query commented out but with the uncommon single quotes left in) compiles and runs fine in a scratch org of mine. If this code is a cut down version, then the problem probably lies in the code you have not included. If this is the exact code, cut and paste it from here into your ...


1

For anyone still experiencing this issue try updating your class metadata apiVersion to 48. I had the same problem and tried everything else. When I updated the apiVersion, it works immediately. Cheers


1

You need to include actionsupport inside your inputfield <apex:inputField value="{!Loan_Memo__c.Relationship__c}" > <apex:actionSupport event="onchange" action="{!getrelatedcovs}" reRender="covenanttable" status="status" /> </apex: inputfield>


1

I think, you are missing rerender attribute for actionFunction and because of this, value is not getting passed. <apex:actionFunction name="embFile" action="{!embFile}" rerender="frm"> <apex:param assignTo="{!embstr}" name="prm" value=""/> </apex:actionFunction>


1

If you use an action region - you can not need to process these validations that are required when adding a new row here like so: <apex:page standardController="Account" extensions="DynamicTextBox"> <apex:form id="form"> <apex:pageBlock id="block" mode="mainDetail"> <apex:pageblockSection columns="1"> ...


1

This time is spent serializing/deserializing the view state. This involves a loop to the server and back when the form is submitted. When you remove the class, Visualforce knows there cannot be a view state and so nothing is ever submitted. For the purposes you listed, there are a bunch of options. The simplest is to not use a commandbutton and just ...


1

The issue here is that when using an Apex inputfield in your page, the actual ID of the element in the DOM will be different than the one you specifically state. Because of this, you cant use your specified static ID in your element selector. Also, because you only have one input field on this particular page, you can use a css selector because it will be ...


1

You can do this thru Javascript HTML -> call Javascript -> call Apex Reference : JavaScript Remoting and Static HTML Add JavaScript functions to the page as handlers to respond to user interaction. Use JavaScript remoting to call Apex @RemoteAction methods that retrieve records, perform DML, and so on. and here's an example with code from ...


1

I believe the form is being submitted. Try updating your button to be <button type="button"> instead of an apex:commandbutton. Alternatively return false from your JS or use e.preventdefault() You might want to look into JS remoting for this use case where you want to handle the response. It's cleaner than re-rendering a script block


1

actionFunction is not working because you are not using "rerender" attribute in actionFunction. There is a bug in VF pages related to actionFuntion that it will work only if you use rerender attribute. So, you have to add rerendere="none" or any element id that you want to rerender , but i think if you use rerender="none" it will work for you. <apex:...


1

If this example is to be trusted, then perhaps the only problem is this line: <apex:column value="{!CWrap.CL[f]}" onclick="sortCLTable(f)"/> If you use your browser's "Inspect Element" you will see that the "f" has not been substituted, because only expressions inside {! } are substituted by Visualforce. What you need instead is this: <apex:...


1

Finally I came up with the following solution. I use actionFunction instead of actionSupport and call it from JavaScript onChange handler. <apex:page controller="requiredCont"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/...


1

Add Boolean properties to your controller called e.g. showAscending and showDescending (that are set appropriately when the controller is constructed and by the Asc and Desc methods) and then use those to control the rendering of the links: <apex:commandLink action="{!Asc}" ... rendered="{!showAscending}" /> <apex:commandLink action="{!Desc}" ... ...


1

The commandLink needs to have a reRender attribute in order to call the actionFunction, otherwise it submits the form causing a postback. You can't cancel the postback, either, because that would also negate the effects on the controller. Worse, you're trying to submit the view state twice, so only one action would win in either case. Try the following ...


Only top voted, non community-wiki answers of a minimum length are eligible