You need to sign in to do that
Don't have an account?
Displaying updated records in visualforce
Hi,
I am trying to create a program in visualforce with ajax
tool. The program will update the record before viewing its details.
Here is my sample code:
<apex:page standardController="ObjectTest__c" >
<script src="/soap/ajax/15.0/connecton.js" type="text/javascript"></script>
<script src="/soap/ajax/15.0/apex.js" type="text/javascript"></script>
<script>
sforce.connection.sessionId = "{!$Api.Session_ID}";
var u = new sforce.SObject("ObjectTest__c");
u.Id = "{!ObjectTest__c.Id}";
u.Field_To_Update__c = 'Hello';
result = sforce.connection.update([u]);
</script>
<apex:detail relatedList="true" />
</apex:page>
The
problem is, although the update has been made, it display the
un-updated data. I have to view again the page inorder to see the
update.
Question, how can I achieve displaying the detail page with the updated data without reloading the page?