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

2
  • 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
    Commented Jan 21, 2016 at 16:16
  • 1
    hey Suyash try this.. Pagereference pg = new Pagereference('/apex/ViewApplicationsRecord?id='+appRecord.id); pg.setRedirect(true); return pg; }
    – Ratan Paul
    Commented Jan 22, 2016 at 7:55

1 Answer 1

1

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;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .