Skip to main content
1 of 6

Unable to redirect to the VF Page using Page Reference method in the Controllr

I have a page reference method in the APex controller which is exposed as rest api.

The page reference method gets invoked and below is the syntax:

PageReference myVFPage = new PageReference('/apex/VFPageName=' + vfPageId); myVFPage.setRedirect(true); For the Pagereference method , I had set the return type as VFPageName.

The method is getting executed with no errors how ever the VF page is not loading. How can I make sure the VF Page gets loaded and the Java Script events gets fired during the page load.

Thank You