+ Start a Discussion
hacksawblade16hacksawblade16 

fetch salesforce page id

i'm not able to fetch the if from the salesforce page into my visual force page

 

 

 

public with sharing class conversionrtestclass {
        
        
        public  list<organization> org=new list<organization>();
        Prospect__c  leadList =new Prospect__c();
        LeadDedupUtility leadUtility;
        public string id;
        
        
      public   Prospect__c  getleadList()
        {
            return leadList;
        }
        
      public  list <Organization> getorg()
        {
            return org;
        }
        
        
      public string getid()
        {
            return id;
        }
     
     
       
        public conversionrtestclass(ApexPages.StandardController stdController)
        {
        
                
                   leadUtility=new LeadDedupUtility();
                   //this.leadList  = ( Prospect__c )stdController.getRecord();
               //this.id=ApexPages.currentPage().getParameters().get(id);
                 id= 'a0Jc00000032sxs';
                   system.debug('Requested ID--->'+id);
                   
                   leadList =leadUtility.getProspect(id);
                   org=leadUtility.getorganization();
                       //selected=FALSE;
                  
                   //org=leadUtility.getorganization();
                  // system.debug('Requested object is--->'+org);
        }
      
      



}

Best Answer chosen by Admin (Salesforce Developers) 
prakash_sfdcprakash_sfdc

Hi,

 

If I am not wrong, you want to fetch the Id that you have as your query parameter.

 

this.id=ApexPages.currentPage().getParameters().get(id);

this.id=ApexPages.currentPage().getParameters().get('id');  //Use single quotes around the query parameter.

 

I hope this will help.

 

Cheers!

 

All Answers

prakash_sfdcprakash_sfdc

Hi,

 

If I am not wrong, you want to fetch the Id that you have as your query parameter.

 

this.id=ApexPages.currentPage().getParameters().get(id);

this.id=ApexPages.currentPage().getParameters().get('id');  //Use single quotes around the query parameter.

 

I hope this will help.

 

Cheers!

 

This was selected as the best answer
hacksawblade16hacksawblade16
thank you :)
hacksawblade16hacksawblade16
i 'm stuck with one more problem...please help me with this