• Stephen N
  • NEWBIE
  • 9 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 7
    Replies
I am customizing the CommunitiesLogin page using VF but am having troubles directing to this customized page. When navigating to my_community_url/login I see the standard, out of the box login page. When navigating to my_community_url/CommunitiesLogin my browser gets stuck in a loop.

I have my Community set up as Active Site Home Page = CC_Home, Inactive Site Home Page = CC_Home and the login page set as the Visualforce Page CommunitiesLogin.

Here is my CommunitiesLoginController:
global with sharing class CommunitiesLoginController {

global CommunitiesLoginController () {}

// Code we will invoke on page load.
global PageReference forwardToAuthPage() {
    String startUrl = System.currentPageReference().getParameters().get('startURL');
    String displayType = System.currentPageReference().getParameters().get('display');
    return Network.forwardToAuthPage(startUrl, displayType);
}

//code to invoke custom login page
global PageReference forwardToCustomAuthPage() {
    String startUrl = System.currentPageReference().getParameters().get('startURL');
    return new PageReference(Site.getPathPrefix() + '/SiteLogin?startURL=' +
    EncodingUtil.urlEncode(startURL, 'UTF-8'));
}
}

Here is my CommunitiesLandingController:
public with sharing class CommunitiesLandingController {

// Code we will invoke on page load.
public PageReference forwardToStartPage() {
    return Network.communitiesLanding();
}

//code to invoke custom login page
public PageReference forwardToCustomAuthPage() {
    String startUrl = System.currentPageReference().getParameters().get('startURL');
    return new PageReference(Site.getPathPrefix() + '/SiteLogin?startURL=' +
    EncodingUtil.urlEncode(startURL, 'UTF-8'));
}

public PageReference forwardTocustomStartPage() {
    return new PageReference('/apex/CC_Home');
}

public CommunitiesLandingController() {}
}

Here is the first line from the CommunitiesLogin page:
<apex:page id="loginPage" controller="CommunitiesLoginController" action="{!forwardToCustomAuthPage}" title="{!$Label.site.site_login}">

Here is the first line from the CommunitiesLanding page:
<apex:page id="communitiesLandingPage" controller="CommunitiesLandingController" action="{!forwardTocustomStartPage}" title="{!$Label.site.site_login}">

Any guesses as to what is causing this loop? Thanks in advance for your assistance.
 I need to find all Opportunities that have Stage = Closed Won and have an Opportunity Product that begins with "Connect". I'm looking for the syntax that would need to go into the If statement for this.  Below is the class I currently have with the line in question notated: 

public static void ConnectCustomerWin(list<Opportunity> oppList, map<id,Opportunity> oldProjectMap) {
        Set<Id> ConnectOppAccounts = new Set<Id>();
        if (oldProjectMap != null){
            for (Opportunity o : oppList) {
                //Find Oppty records where Stage = Closed won and have a Opportunity Product that starts with Connect
                if (o.StageName == 'Closed Won' && o.OpportunityLineItems__r.Product2 == 'Connect'){ //line in question
                ConnectOppAccounts.add(o.accountid);
                }
            }
        }
I'm struggling with the custom lightning component on this part. I don't have much background coding and am having trouble finding resources to help me achieve coding the lightning component. If someone could help give me some framework code to create a custom lightning component to hold a URL or direct me to a resource that help break this down I'd be very appreciative.
 
The following won't validate, but won't pass the validation in this trail.  Quantity field is howver using the correct field.  Thoughts?

User-added image

<aura:component>

<aura:attribute name="item" type="Camping_Item__c" required="true"/>    
    <ui:outputText value="{!v.item.Name}"/>
    <ui:outputCheckbox value="{!v.item.Packed__c}"/>
    <ui:outputCurrency value="{!v.item.Price__c}"/>
      <ui:outputNumber value="{!v.item.Quantity}"/>
            
</aura:component>
Hi,

We have a SF package related to chatter and communities. This package requires communities to be enabled in an org to install. However in one of our client's org, the Package Installation is failing with error for Missing Organization Feature: Customer Success Portal. We do not have any dependency on this feature as such, however the package is also showing a dependency on this feature under the package details in the development org. We are able to successfully install the package on our test orgs even when Customer Portal is not enabled showing that there should not be any dependency on this feature. We also have went ahead and created a Trial org (to check) which does not have the customer portal feature and we just enabled Partner community in the org. And we were able to successfully deploy the complete code and config to the new trial EE org (with customer portal feature totally not existing. showing up in that org). So our dependency is communities and not the customer portal which is verified with the complete code being deployed to the Trial org without any issues. However the package seems to be showing a wrong dependency. It should be showing the dependency as Communities and NOT customer portal. We contacted SF support but they said this is developer issue. We are failing to understand how to resolve this dependency when its SF who is showing this as a dependency. 

​Can anyone please help how to resolve this? Any help is highly appreciated.

Regards
Kamal
I am customizing the CommunitiesLogin page using VF but am having troubles directing to this customized page. When navigating to my_community_url/login I see the standard, out of the box login page. When navigating to my_community_url/CommunitiesLogin my browser gets stuck in a loop.

I have my Community set up as Active Site Home Page = CC_Home, Inactive Site Home Page = CC_Home and the login page set as the Visualforce Page CommunitiesLogin.

Here is my CommunitiesLoginController:
global with sharing class CommunitiesLoginController {

global CommunitiesLoginController () {}

// Code we will invoke on page load.
global PageReference forwardToAuthPage() {
    String startUrl = System.currentPageReference().getParameters().get('startURL');
    String displayType = System.currentPageReference().getParameters().get('display');
    return Network.forwardToAuthPage(startUrl, displayType);
}

//code to invoke custom login page
global PageReference forwardToCustomAuthPage() {
    String startUrl = System.currentPageReference().getParameters().get('startURL');
    return new PageReference(Site.getPathPrefix() + '/SiteLogin?startURL=' +
    EncodingUtil.urlEncode(startURL, 'UTF-8'));
}
}

Here is my CommunitiesLandingController:
public with sharing class CommunitiesLandingController {

// Code we will invoke on page load.
public PageReference forwardToStartPage() {
    return Network.communitiesLanding();
}

//code to invoke custom login page
public PageReference forwardToCustomAuthPage() {
    String startUrl = System.currentPageReference().getParameters().get('startURL');
    return new PageReference(Site.getPathPrefix() + '/SiteLogin?startURL=' +
    EncodingUtil.urlEncode(startURL, 'UTF-8'));
}

public PageReference forwardTocustomStartPage() {
    return new PageReference('/apex/CC_Home');
}

public CommunitiesLandingController() {}
}

Here is the first line from the CommunitiesLogin page:
<apex:page id="loginPage" controller="CommunitiesLoginController" action="{!forwardToCustomAuthPage}" title="{!$Label.site.site_login}">

Here is the first line from the CommunitiesLanding page:
<apex:page id="communitiesLandingPage" controller="CommunitiesLandingController" action="{!forwardTocustomStartPage}" title="{!$Label.site.site_login}">

Any guesses as to what is causing this loop? Thanks in advance for your assistance.
 I need to find all Opportunities that have Stage = Closed Won and have an Opportunity Product that begins with "Connect". I'm looking for the syntax that would need to go into the If statement for this.  Below is the class I currently have with the line in question notated: 

public static void ConnectCustomerWin(list<Opportunity> oppList, map<id,Opportunity> oldProjectMap) {
        Set<Id> ConnectOppAccounts = new Set<Id>();
        if (oldProjectMap != null){
            for (Opportunity o : oppList) {
                //Find Oppty records where Stage = Closed won and have a Opportunity Product that starts with Connect
                if (o.StageName == 'Closed Won' && o.OpportunityLineItems__r.Product2 == 'Connect'){ //line in question
                ConnectOppAccounts.add(o.accountid);
                }
            }
        }