• sw6
  • NEWBIE
  • 40 Points
  • Member since 2013

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 15
    Replies

Hi I'm working on communities and would like to customize the change password page that is displayed to the customer after a password reset. This is the url to the default changepassword-     /_ui/system/security/ChangePassword.  I have customized the changepassword vf page that Salesforce provides but when I try to test it out it still takes me back to the same old SF default changepassword. After much digging it appears to me that the changepassword vf page that's provided with the communities is tied to the user's personal profile. My question is where is the right page that needs to be customized or how can I make the change password link take the user to the custom page. Or is it even possible?

 

Thanks. 

  • October 02, 2013
  • Like
  • 0

Hi Guys,

 

I have an apex code for a visualforce page but I'm having a bit of an issue returning values from the account object which is one of the master objects in my junction object.

The code below shows the part of my code where i have identified the issue to be from. 

 
public id uuid = UserInfo.getUserid();
    public id acctid = [select accountid from user where id = :uuid][0].accountid;
    public list<AccountAssociatedSite__c> relatesites = [Select RelatedSite__c,RelatedSite__r.Related_Site__c,RelatedAccount__c,RelatedSite__r.Name From AccountAssociatedSite__c a where RelatedAccount__c = :acctid];    
    public list<String> siteac = new List<String>();    
    public list<AccountAssociatedSite__c>listOfSiteAccounts = new list<AccountAssociatedSite__c>();


public void acssites(){
        for(AccountAssociatedSite__c res : relatesites){
            
            siteac.add(res.RelatedSite__r.Related_Site__c);
            
        }
        
    }
    
    public void acsites(){
        for(string sitename : siteac){
            
                listOfSiteAccounts = [select RelatedAccount__r.Name,RelatedSite__r.Related_Site__c from AccountAssociatedSite__c where RelatedSite__r.Related_Site__c like :sitename];            
            
        }
        
    }
    
     public ApexPages.StandardSetController setAllAccountsOfSites {
        get {
            if(setAllAccountsOfSites == null) {
                setAllAccountsOfSites = new ApexPages.StandardSetController(listOfSiteAccounts);
                }
            return setAllAccountsOfSites;
        }
        set;
     }     
    
    //initialize setAllAccountsOfSites and return records
    public List<AccountAssociatedSite__c> getAccountsOfSites() {
        return (List<AccountAssociatedSite__c>) setAllAccountsOfSites.getRecords();
    }
    

 

The code does not return any errors but I am unable to get any values added to the siteac list of type string - I found this out using the developer console to debug. I'm not sure why. (Related_Site__c is an URL but for some reason apex returns it as a String, and hence my use of  list of type String).

Also AccountAssociatedSite__c is a junction object with the account object as one of its masters. I just want to return a list of accounts which share a site - so for each site, I return all the accounts that use that site.

 

Thanks for any suggestions.

  • September 19, 2013
  • Like
  • 0

Hi.what is the best way to limit managers in the same role to being able to only see the records they own and those of their subordinates. In other words Manager A cannot see what manager B (and B's subordinates) have and vice versa.

Thanks

  • September 12, 2013
  • Like
  • 0

I am currently working on an important project on Salesforce communities and one of the tabs that need to be accessible to external users is the cases object(my first crack at communities). I'm doing my due diligence by reading the Salesforce Case Implementation Guide here. I currently plan on using the out-of-the-box case layout for internal users and creating a visualforce page with limited number of fields for external users.
How have you implemented cases in the SF community and are there any gotchas I need to be careful about?

 

 

 

  • September 10, 2013
  • Like
  • 0

In a visualforce page with a controller extension, can you use a standard list to access a set of records? 

  • September 05, 2013
  • Like
  • 0

    Hi, could someone walk me through the process of customizing the salesforce communities login page? I have read the communities implementation guide but was a bit confused on certain aspects.

 

http://na15.salesforce.com/help/doc/en/salesforce_communities_implementation.pdf

 

1. Are we supposed to simply drop the visualforce markup into the salesforce generated communitiesLogin  visualforce page?

 

2. There is also a SF generated customerLoginController that is provided when you create your community. The implementation guide says you should add the code below to the controller. Do I just need to add this code without applying any changes to the already provided page reference method? 

 

global PageReference forwardToCustomAuthPage() {
        String startUrl = System.currentPageReference().getParameters().get('startURL');
        return new PageReference(Site.getPrefix() + '/SiteLogin?startURL=' +
        EncodingUtil.urlEncode(startURL, 'UTF-8'));
}

 

Thanks.

  • September 03, 2013
  • Like
  • 0

Hi I have the trigger below to populate a child field from a parent object field. Upon firing the trigger gives a NULL Pointer error. I have tried severally to for a solution to it but to no avail. Could someone help me with an explanation as to why the error and suggestion to a solution. Thanks.

 

 

trigger populateFieldOnCase on Case (before insert){

Set<id>parentIds = new Set<id>();

for(Case acase:trigger.new){

parentIds.add(acase.project__c);
}
Map<id,parent__c> pro = new Map<id,parentt__c>([select id,parentField__c from parent__c where id in :parentIds]);

for(case acase:trigger.new){

acase.childfield__c = pro.get(acase.id).parentField__c;

}
}

  • August 26, 2013
  • Like
  • 0

Hi I'm working on communities and would like to customize the change password page that is displayed to the customer after a password reset. This is the url to the default changepassword-     /_ui/system/security/ChangePassword.  I have customized the changepassword vf page that Salesforce provides but when I try to test it out it still takes me back to the same old SF default changepassword. After much digging it appears to me that the changepassword vf page that's provided with the communities is tied to the user's personal profile. My question is where is the right page that needs to be customized or how can I make the change password link take the user to the custom page. Or is it even possible?

 

Thanks. 

  • October 02, 2013
  • Like
  • 0

Hi Guys,

 

I have an apex code for a visualforce page but I'm having a bit of an issue returning values from the account object which is one of the master objects in my junction object.

The code below shows the part of my code where i have identified the issue to be from. 

 
public id uuid = UserInfo.getUserid();
    public id acctid = [select accountid from user where id = :uuid][0].accountid;
    public list<AccountAssociatedSite__c> relatesites = [Select RelatedSite__c,RelatedSite__r.Related_Site__c,RelatedAccount__c,RelatedSite__r.Name From AccountAssociatedSite__c a where RelatedAccount__c = :acctid];    
    public list<String> siteac = new List<String>();    
    public list<AccountAssociatedSite__c>listOfSiteAccounts = new list<AccountAssociatedSite__c>();


public void acssites(){
        for(AccountAssociatedSite__c res : relatesites){
            
            siteac.add(res.RelatedSite__r.Related_Site__c);
            
        }
        
    }
    
    public void acsites(){
        for(string sitename : siteac){
            
                listOfSiteAccounts = [select RelatedAccount__r.Name,RelatedSite__r.Related_Site__c from AccountAssociatedSite__c where RelatedSite__r.Related_Site__c like :sitename];            
            
        }
        
    }
    
     public ApexPages.StandardSetController setAllAccountsOfSites {
        get {
            if(setAllAccountsOfSites == null) {
                setAllAccountsOfSites = new ApexPages.StandardSetController(listOfSiteAccounts);
                }
            return setAllAccountsOfSites;
        }
        set;
     }     
    
    //initialize setAllAccountsOfSites and return records
    public List<AccountAssociatedSite__c> getAccountsOfSites() {
        return (List<AccountAssociatedSite__c>) setAllAccountsOfSites.getRecords();
    }
    

 

The code does not return any errors but I am unable to get any values added to the siteac list of type string - I found this out using the developer console to debug. I'm not sure why. (Related_Site__c is an URL but for some reason apex returns it as a String, and hence my use of  list of type String).

Also AccountAssociatedSite__c is a junction object with the account object as one of its masters. I just want to return a list of accounts which share a site - so for each site, I return all the accounts that use that site.

 

Thanks for any suggestions.

  • September 19, 2013
  • Like
  • 0

Hi.what is the best way to limit managers in the same role to being able to only see the records they own and those of their subordinates. In other words Manager A cannot see what manager B (and B's subordinates) have and vice versa.

Thanks

  • September 12, 2013
  • Like
  • 0

In a visualforce page with a controller extension, can you use a standard list to access a set of records? 

  • September 05, 2013
  • Like
  • 0

    Hi, could someone walk me through the process of customizing the salesforce communities login page? I have read the communities implementation guide but was a bit confused on certain aspects.

 

http://na15.salesforce.com/help/doc/en/salesforce_communities_implementation.pdf

 

1. Are we supposed to simply drop the visualforce markup into the salesforce generated communitiesLogin  visualforce page?

 

2. There is also a SF generated customerLoginController that is provided when you create your community. The implementation guide says you should add the code below to the controller. Do I just need to add this code without applying any changes to the already provided page reference method? 

 

global PageReference forwardToCustomAuthPage() {
        String startUrl = System.currentPageReference().getParameters().get('startURL');
        return new PageReference(Site.getPrefix() + '/SiteLogin?startURL=' +
        EncodingUtil.urlEncode(startURL, 'UTF-8'));
}

 

Thanks.

  • September 03, 2013
  • Like
  • 0

Hi I have the trigger below to populate a child field from a parent object field. Upon firing the trigger gives a NULL Pointer error. I have tried severally to for a solution to it but to no avail. Could someone help me with an explanation as to why the error and suggestion to a solution. Thanks.

 

 

trigger populateFieldOnCase on Case (before insert){

Set<id>parentIds = new Set<id>();

for(Case acase:trigger.new){

parentIds.add(acase.project__c);
}
Map<id,parent__c> pro = new Map<id,parentt__c>([select id,parentField__c from parent__c where id in :parentIds]);

for(case acase:trigger.new){

acase.childfield__c = pro.get(acase.id).parentField__c;

}
}

  • August 26, 2013
  • Like
  • 0

Hi,

 

A simple Visualforce question: What’s the quick and dirty way of getting a value of the values for keys of a Map from an APEX class?

 

Example – I need the value of the key ‘A’ on a Visaulforce page, from the following:

 

public Map<String,String>> getThings(){
  Map<String,String> opts = new Map<String,String>(){'A'=>'B'};
  return opts;
}

 

I tried accessing it on the page as {!opts.A}, which gives me an error "MapValue.A" does not exist.

 

Thanks,

GreatG

  • February 28, 2008
  • Like
  • 0