• chaitanya Krishna 19
  • NEWBIE
  • 40 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 4
    Replies
Hi team,

i am trying to combine both site login and site registration controller in a single controller.

But my login button on vf page is not working at all. i hope i did mistake in apex.


global with sharing class PortalSiteController {                     
global String username {get; set;}                 
global String password {get; set;}               
  global String Firstname {get; set;}                
 global String LastName {get; set;}                 
global String email {get; set;}                 
private static Id PORTAL_ACCOUNT_ID = '001x000xxx35tPN';     
                                              
global PortalSiteController () {                    
 }                                                               
global PageReference login() {                                 
String startUrl = System.currentPageReference().getParameters().get('startURL');                                 return Site.login(username, password, startUrl);                                
 }                                                               

global PageReference registerUser() {                                                                        
 User u = new User();                                 
u.Username = LastName;                                
 u.CommunityNickname= Firstname;                                 
u.Email = email;                                                                          
String accountId = PORTAL_ACCOUNT_ID;                                        
 String userId = Site.createPortalUser(u, accountId);                                         
 if (userId != null)                                          
{                                                                                    
PageReference page = System.Page.SiteRegisterConfirm;                                        
 page.setRedirect(true);                                        
 return page;                                        
 }                                                                                     
  return null;                                        
  }               
  }

Can any one help me on this.. i am new to coding so.. and what we should mention in starturl.... i am not able to understand the use of starturl..

please help me in this

chaitu
Hey Team,

I am implementing partner portal in my project, Actually when ever user selects forgot password link the salesforce defaultly asks for the username and sends a reset link to the user email.
the use case is before sending the reset link we should check wether the user name existing in our org or not... if its existed then oly it should send the reset link...

i dont know how to acheive this... can any one help me with the source..
Hi Team

How actually the authentication takes place in partner portal...  And how to authenticate a user in partner portal with custom contollers... 
 
Hi Team,
I am trying to implement a login page for Partner Portal , in that when ever user select forgot password link it should send the reset link to customers Email.

How to acheive this.. can any one help with source for the same..

thanks in advance.
Hey Team, 

I need to implement the chatter on vf with groups and other standard features of chatter. I am using <chatter:feed entityId='{!}' />.

I am getting chatter feed but am not getting the icons which are on left side like groups.

Kindly help me 
Hi Team,

In Partner Portal.. I attached 4 Images in Notes and attachments to different Account ... and scenario  is images should display dynamically basing on the logged in account... i am not able to refer on Visualforce Page.... Can yu please help me on the code...Help me how to refer in VF pages...

Thanks In advance
Hi Team

How actually the authentication takes place in partner portal...  And how to authenticate a user in partner portal with custom contollers... 
 
Hi Team,

In Partner Portal.. I attached 4 Images in Notes and attachments to different Account ... and scenario  is images should display dynamically basing on the logged in account... i am not able to refer on Visualforce Page.... Can yu please help me on the code...Help me how to refer in VF pages...

Thanks In advance

Hi,

 I want to display an image from attached file on vf page.

 

//vf

<apex:page standardController="stdCust_obj__c" extensions="displayImageExtension">
<table><tr>
<td><h1>Photo:</h1></td>
<td>
<apex:image url="/servlet/servlet.FileDownload?file=file.Id"/>
</td>
</tr>
</table>
</apex:page>

 

//apex

 

public class displayImageExtension {

private id StCustId;
List<Attachment> file;

 

public displayImageExtension(ApexPages.StandardController stdController) {
this.StCustId = ApexPages.currentPage().getParameters().get('id');
}

public List<Attachment> getfile(){

file=[Select Id,Name,LastModifiedDate from attachment where ParentId=:StCustId];
return file; 
}

 

}

 

Thanks in advance.

  • July 20, 2013
  • Like
  • 0