1

I am getting a problem with my visualforce page which has bootstrap integrated to it. Scenerio:

The page when its is accessed from salesforce it creates no problem and works totally fine,but the problem arises when the page is accessed from the salesforce.com sites;

Problem: When accessed from Salesforce.com Sites the page sometimes unable to Save the Input Data ,Sometimes its doesnt Refresh page properly, Sometimes it does'nt Rerender the page properly ,And sometimes it works fine. The user need to access the page only with Salesforce.com Sites. I am pagereference in controller to redirect the page but with sites sometimes it doesnt redirect.

Anyone faced the problem as I am experiencing,please advice me on this.

If you need the code for the page I can provide that too .

Here's the pagereference i am using:

Pagereference pg = new Pagereference();
PageReference(URL.getSalesforceBaseUrl().toExternalForm()+'/apex/ViewApplicationsRecord?id='+appRecord.id);
pg.setRedirect(true);
return pg;
}

When page redirect to itself the saved data does'nt come in right way.

Thanks,

Suyash Singhal

  • 1
    Hi (username), welcome to SFSE! Please take the time to visit the Help center and read How do I ask a good question. The more details you provide, particularly code you've written, the more likely it is that someone will respond to your question with an answer you'll find helpful. – crmprogdev Jan 21 '16 at 16:16
  • 1
    hey Suyash try this.. Pagereference pg = new Pagereference('/apex/ViewApplicationsRecord?id='+appRecord.id); pg.setRedirect(true); return pg; } – Ratan Paul Jan 22 '16 at 7:55
0

Within a site, you don't use /apex to get to a page. Try

PageReference pg = Page.ViewApplicationsRecord;
pg.getParameters().set('id',appRecord.id);
pg.setRedirect(true);
return pg;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.