• JoséTlaseca
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Hello everybody:

I have to enable SSO for communities, the scenario is that they have a webpage where they have a login form, this login form should validate users against Salesforce as a community user, so if the users is valid the person should be redirected to their community landing page.

I'm really confused about this and the related terms, my understanding is that Salesforce is the identity provider, however i don't know what is what i need to do do acomplish this.

Can anybody give me some help?

Thanks in advance.
Hello community!

I always try to solve issues by myself, but this time i have tried several things and i can't fix it. Here we go:

I have created several VF pages and controllers that interact between each other by PageReference methods.

Lets say We have 2 pages and 2 controllers:

ContactsListPage => ContactsListPageController
ContactDetailPage => ContactDetailPageController

ContactsListPage shows a table with records with a commandButton each, this way user can edit the desired record. The edit action invokes EditRecord() method from ContactsListPageController, which creates a page reference and adds some query strings to it to know which contact was selected.
Then ContactDetailPage is invoked and shows the edit form and a Save command button. This button invokes SaveRecord from ContactDetailPageController. This method does a setRedirect(true) to the pageReference in order to force the ContactsListPage to show the changes made by the user in the list of contacts.

Something like this:

ContactsListPageController
{
    ...
    PageReference EditRecord()
    {
        ...
        PageReference page = new PageReference('apex/ContactDetailPage?recordId=' + someId);
        page.setRedirect(true);
        return page;
    }
}


ContactDetailPageController
{
    ...
    PageReference SaveRecord()
    {
        update record;
        ...
        PageReference page = new PageReference('apex/ContactsListPage');
        page.setRedirect(true); //To preserve viewstate vars and force ContactsListPage to show the changes
        return page;
    }
}



This works perfect from inside salesforce, I mean, invoking VF pages by adding /apex/ContactsListPage to the URL to show the first page.

Well, the problem is that those app are needed to be shown using a force.com Site, and there the setRedirect seems not to work. The changes made by the user in the contact detail page are not reflected to the contacts list page when it is saved unless user manually refreshes the page with the browser button of hitting F5.
All the changes are well saved to Salesforce, the problem is only in the UI, it is not refreshing.

The weird thing is that it works as it should if i don't use Sites.

Any idea what is causing this and how to dolve it?

Any comment is welcome.

Regards!
Hello community!

I always try to solve issues by myself, but this time i have tried several things and i can't fix it. Here we go:

I have created several VF pages and controllers that interact between each other by PageReference methods.

Lets say We have 2 pages and 2 controllers:

ContactsListPage => ContactsListPageController
ContactDetailPage => ContactDetailPageController

ContactsListPage shows a table with records with a commandButton each, this way user can edit the desired record. The edit action invokes EditRecord() method from ContactsListPageController, which creates a page reference and adds some query strings to it to know which contact was selected.
Then ContactDetailPage is invoked and shows the edit form and a Save command button. This button invokes SaveRecord from ContactDetailPageController. This method does a setRedirect(true) to the pageReference in order to force the ContactsListPage to show the changes made by the user in the list of contacts.

Something like this:

ContactsListPageController
{
    ...
    PageReference EditRecord()
    {
        ...
        PageReference page = new PageReference('apex/ContactDetailPage?recordId=' + someId);
        page.setRedirect(true);
        return page;
    }
}


ContactDetailPageController
{
    ...
    PageReference SaveRecord()
    {
        update record;
        ...
        PageReference page = new PageReference('apex/ContactsListPage');
        page.setRedirect(true); //To preserve viewstate vars and force ContactsListPage to show the changes
        return page;
    }
}



This works perfect from inside salesforce, I mean, invoking VF pages by adding /apex/ContactsListPage to the URL to show the first page.

Well, the problem is that those app are needed to be shown using a force.com Site, and there the setRedirect seems not to work. The changes made by the user in the contact detail page are not reflected to the contacts list page when it is saved unless user manually refreshes the page with the browser button of hitting F5.
All the changes are well saved to Salesforce, the problem is only in the UI, it is not refreshing.

The weird thing is that it works as it should if i don't use Sites.

Any idea what is causing this and how to dolve it?

Any comment is welcome.

Regards!
Hello community!

I always try to solve issues by myself, but this time i have tried several things and i can't fix it. Here we go:

I have created several VF pages and controllers that interact between each other by PageReference methods.

Lets say We have 2 pages and 2 controllers:

ContactsListPage => ContactsListPageController
ContactDetailPage => ContactDetailPageController

ContactsListPage shows a table with records with a commandButton each, this way user can edit the desired record. The edit action invokes EditRecord() method from ContactsListPageController, which creates a page reference and adds some query strings to it to know which contact was selected.
Then ContactDetailPage is invoked and shows the edit form and a Save command button. This button invokes SaveRecord from ContactDetailPageController. This method does a setRedirect(true) to the pageReference in order to force the ContactsListPage to show the changes made by the user in the list of contacts.

Something like this:

ContactsListPageController
{
    ...
    PageReference EditRecord()
    {
        ...
        PageReference page = new PageReference('apex/ContactDetailPage?recordId=' + someId);
        page.setRedirect(true);
        return page;
    }
}


ContactDetailPageController
{
    ...
    PageReference SaveRecord()
    {
        update record;
        ...
        PageReference page = new PageReference('apex/ContactsListPage');
        page.setRedirect(true); //To preserve viewstate vars and force ContactsListPage to show the changes
        return page;
    }
}



This works perfect from inside salesforce, I mean, invoking VF pages by adding /apex/ContactsListPage to the URL to show the first page.

Well, the problem is that those app are needed to be shown using a force.com Site, and there the setRedirect seems not to work. The changes made by the user in the contact detail page are not reflected to the contacts list page when it is saved unless user manually refreshes the page with the browser button of hitting F5.
All the changes are well saved to Salesforce, the problem is only in the UI, it is not refreshing.

The weird thing is that it works as it should if i don't use Sites.

Any idea what is causing this and how to dolve it?

Any comment is welcome.

Regards!