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
cby016cby016 

update opportunity value without reloading the page

I have a custom button that does an ajax request to another server and retrieves some information. I then update the opportunity with the retrieved information. I would like to update the dom with the new information without having to reload the page, after all isn't that what ajax is for - to update the current page without reloading the whole page?

*werewolf**werewolf*

You might be able to do that, but it would be a massive hack that would break as soon as Salesforce.com changed the page structure.  The pages have no API for field manipulation in that manner.  So I'd advise against it.

sfdcfoxsfdcfox

I recommend that you do not do this in an S-Control. Instead, use a Visualforce page with an Extension. This will allow you to update the page's data using AJAX. As stated before, the DOM could change at any time (although it has been generally stable for at least five years, it could change any day).