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 ??
ReplyDeleteI really enjoyed while reading your article and it is good to know the latest updates. Do post more. Please also read my topics about
ReplyDeleteSalesforce Customization Services
Salesforce Managed Services
Salesforce Managed Services USA
Hire Salesforce Consultant
Hire Salesforce Developers
AI Integration Services
AI Chatbot Development Services
n8n Development Services
Salesforce Application Development Services
Offshore Salesforce Development Services