function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Knet15Knet15 

How to update a costum field using ajax

Hello, 

I wanted to know if is possible to update a costum field using AJAX, I could reach it but updating an object and then loading the page,
window.location.reload();

Could I update the field on the page using AJAX, without load all the page?

Thank you very much,
Greetings.
Best Answer chosen by Knet15
Knet15Knet15
Here an usefull link: 
 * http://www.cloudforce4u.com/2013/07/render-and-rerender-in-salesforce.html

All Answers

RamuRamu (Salesforce Developers) 
You can use few special functions in salesforce that does the job of ajaxifying or partial update. The functions are  Apex:ActionSupport, Apex:ActionFunction,Apex:ActionRegions. The below articles has an example of how you can go about doing this

http://www.oyecode.com/2013/04/how-to-re-render-part-of-visualforce.html

Below are some of the articles for your reference.

https://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_actionFunction.htm
https://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_actionRegion.htm
https://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_actionSupport.htm
Knet15Knet15
Hello Ramu, 
Thank you very much for your help, but this time I saw that the example refer when you create a new salesforce page, is there any possibility to add the ajax code of an existing page?

thank you, could you help me?
Knet15Knet15
Here an usefull link: 
 * http://www.cloudforce4u.com/2013/07/render-and-rerender-in-salesforce.html
This was selected as the best answer