I did use below syntax:
PageReference nextPage = new PageReference('/' + caseId);
nextPage.setRedirect(true);
return nextPage;
to redirect back to View page which works fine.
Mine question is How can I then redirect to Merge Case standard screen?
FYI: I tried below:
PageReference nextPage = new PageReference('/' + caseId); //new PageReference(referrer);
nextPage.setRedirect(true);
// Redirect to the standard Merge Case screen
PageReference mergeCasesPage = new PageReference('/merge/CaseMerge.jsp');
mergeCasesPage.setRedirect(true);
nextPage.getHeaders().put('X-XSS-Protection', '0'); // Allow JavaScript execution
nextPage.getParameters().put('nexturl', mergeCasesPage.getUrl());
return nextpage;
but couldn't achieve what I want. When I tried mergeCasesPage only then It says url no longer exist or something .
I this is any way not possible can you please state reason.
Sorry @Shamser Dhami, I'm not able to provide any insight here. I don't regularly write code and don't have any additional insight that I can provide here. You *should* be able to go back to the case page, no problem. ... I'm not 100% certain if there's anything special blocking you from going to the MERGE page directly.
My few suggestions:
- Have you tried posting your question on our DEVELOPER forums? When you get down to lines of code... the folks who regularly go through the developer site might be able to provide more help.
- Have you tried logging a case with support? Perhaps they'd be able to offer some insights.