• Vin25
  • NEWBIE
  • 34 Points
  • Member since 2013

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies

    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,

Has anyone worked on this before. I am working on integration between Salesforce -CornerStone using CornerStone SOAP API. I have generated apex classes from WSDL. Since, the soap header with username/password information is not generated by wsdl2apex, I have updated the apex classes to include username and password. However, I was able to get the below xml format by updating the apex class.
 
<env:Header> 
<Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> 
<UsernameToken> <Username>domainName/username</Username> 
<Password > <value>PSWDXX</value> </Password> 
</UsernameToken> 
</Security> 
</env:Header>

However, the API expects the below XML Request:
 
<o:UsernameToken u:Id="uuid-dd7a656b-27ae-4139-93fe-840d1681bb0e-1">
<o:Username>[CORPNAME]\[WEBSERVICEACCOUNT]</o:Username>
<o:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-
200401-wss-username-token-profile-
1.0#PasswordText">password</o:Password>
</o:UsernameToken>

How do I code the apex class inorder to include the password value without the additional <value> PWSDXX </value> tag.

Greatly appreciate any inputs.

APEX CLASS CODE SNIPPET:
 
//soap headers need to be generated and inserted for authentication against WSSE web-services
    public class Security {
    public UsernameToken usernameToken;
    public Security(UsernameToken u){
    	this.usernameToken = u;
    }
    private String[] usernameToken_type_info = new String[]{'UsernameToken','http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','UsernameToken','0','1','true'};
    private String[] apex_schema_type_info = new String[]{'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','true','false'};
    private String[] field_order_type_info = new String[]{'usernameToken'};
    }
    
    public class UsernameToken {
    public String username;
    public Password password;
    
    public UsernameToken(String username, Password password){
    	this.username = username;
    	this.password = password;
    }
    
    private String[] username_type_info = new String[]{'Username','http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','string','0','1','true'};
    private String[] password_type_info = new String[]{'Password','http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','string','1','1','true'};
    private String[] apex_schema_type_info = new String[]{'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','true','false'};
    private String[] field_order_type_info = new String[]{'username','password'};
    }
    
    public class Password {
    	
    public string Type;
    public string content;
    	
    public Password(String Type, String value){
    		this.Type = Type;
    		this.content = content;
    }
    
    private String[] Type_att_info = new String[]{'Type'};
    private String[] content_type_info = new String[]{'content','http://www.w3.org/2001/XMLSchema','string','1','1','true'};
    private String[] apex_schema_type_info = new String[]{'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','true','false'};
    private String[] field_order_type_info = new String[]{'value'};	
    	
    }



Thanks!
  • July 20, 2015
  • Like
  • 0
Hi ,
I have a Contact field on a custom object which has a look up filter to an account (account lookup field on the same custom object). When I update the contact to another contact (belonging to the same account) , I get a message that "Contact is no longer valid with your selections" although the contact does match the filter criteria. It saves successfully though.

This message also occurs when the previous contact is reselected.

Is this a known Salesforce bug?

Thanks in advance!


  • July 08, 2014
  • Like
  • 0
Hi,

Has anyone worked on this before. I am working on integration between Salesforce -CornerStone using CornerStone SOAP API. I have generated apex classes from WSDL. Since, the soap header with username/password information is not generated by wsdl2apex, I have updated the apex classes to include username and password. However, I was able to get the below xml format by updating the apex class.
 
<env:Header> 
<Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> 
<UsernameToken> <Username>domainName/username</Username> 
<Password > <value>PSWDXX</value> </Password> 
</UsernameToken> 
</Security> 
</env:Header>

However, the API expects the below XML Request:
 
<o:UsernameToken u:Id="uuid-dd7a656b-27ae-4139-93fe-840d1681bb0e-1">
<o:Username>[CORPNAME]\[WEBSERVICEACCOUNT]</o:Username>
<o:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-
200401-wss-username-token-profile-
1.0#PasswordText">password</o:Password>
</o:UsernameToken>

How do I code the apex class inorder to include the password value without the additional <value> PWSDXX </value> tag.

Greatly appreciate any inputs.

APEX CLASS CODE SNIPPET:
 
//soap headers need to be generated and inserted for authentication against WSSE web-services
    public class Security {
    public UsernameToken usernameToken;
    public Security(UsernameToken u){
    	this.usernameToken = u;
    }
    private String[] usernameToken_type_info = new String[]{'UsernameToken','http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','UsernameToken','0','1','true'};
    private String[] apex_schema_type_info = new String[]{'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','true','false'};
    private String[] field_order_type_info = new String[]{'usernameToken'};
    }
    
    public class UsernameToken {
    public String username;
    public Password password;
    
    public UsernameToken(String username, Password password){
    	this.username = username;
    	this.password = password;
    }
    
    private String[] username_type_info = new String[]{'Username','http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','string','0','1','true'};
    private String[] password_type_info = new String[]{'Password','http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','string','1','1','true'};
    private String[] apex_schema_type_info = new String[]{'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','true','false'};
    private String[] field_order_type_info = new String[]{'username','password'};
    }
    
    public class Password {
    	
    public string Type;
    public string content;
    	
    public Password(String Type, String value){
    		this.Type = Type;
    		this.content = content;
    }
    
    private String[] Type_att_info = new String[]{'Type'};
    private String[] content_type_info = new String[]{'content','http://www.w3.org/2001/XMLSchema','string','1','1','true'};
    private String[] apex_schema_type_info = new String[]{'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','true','false'};
    private String[] field_order_type_info = new String[]{'value'};	
    	
    }



Thanks!
  • July 20, 2015
  • 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