In your Class use a String as a Returntype
and create your reference like this in your webservice class
and create your reference like this in your webservice class
return String.valueOf( new PageReference('/'+Case.Id).getUrl());
and in your Button, you have to catch your return String and reload the page:var newurl = sforce.apex.execute("TestClass","CreateTestRecords", {id:"{!Case.Id}"});
parent.location.href = newurl; //refresh the page
 
Can we redirect the page the same way to the edit page of the record ??
ReplyDelete