You need to sign in to do that
Don't have an account?
helP;Null Pointer Exception
System.NullPointerException: Attempt to de-reference a null object
Class.LeadDedupUtility.getorganization: line 29, column 1
Class.conversionrtestclass.<init>: line 44, column 1
string soundxforName=soundxObj.getSoundxNumber(prospectDetails.Name,6);---> this is Class.LeadDedupUtility.getorganization: line 29, column 1
my controller code is
public with sharing class conversionrtestclass {
public list<organization> org=new list<organization>();
public SoundxNumberGenerator x=new SoundxNumberGenerator();
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();
ApexPages.currentPage().getParameters().get(id);
//system.debug('Requested ID--->'+id);
leadList =leadUtility.getProspect(id);
//selected=FALSE;
org=leadUtility.getorganization();---------------->>>>>this line 44 colum 1
system.debug('Requested object is--->'+org);
}
}
can you tell me how can i display the fields of custom object on vf page along with checkboxex attached to each field.
This is my VF page and controller class..can you just illustrate it here??
<apex:page StandardController="Prospect__c" extensions="conversionrtestclass">
<apex:form >
<apex:sectionHeader title="Convert Prospect" / >
<apex:pageBlock title="Prospect Details">
<apex:pageBlockSection >
<!--<apex:outputLabel value="Prospect Name" for=""></apex:outputLabel>-->
<apex:outputField value="{!leadList.First_Name__c}"/>
<apex:outputField value="{!leadList.Last_Name__c}"/>
<apex:outputField value="{!leadList.City__c}"/>
<apex:outputField value="{!leadList.Email__c}"/>
<apex:outputField value="{!leadList.Organization__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection >
<apex:outputField value="{!leadList.Amount__c}"/>
<apex:outputField value="{!leadList.PledgeAmount__c}"/>
</apex:pageBlockSection>
</apex:pageblock>
<apex:pageBlock >
<apex:PageBlockSection title="People">
<apex:pageBlockTable value="{!prospect_Contact}" var="contact" columnsWidth="20px,200px,200px,200px,200px">
<apex:column >
<apex:selectRadio ></apex:selectRadio>
</apex:column>
<apex:column value="{!contact.Name}" />
<apex:column value="{!contact.Email }" />
<apex:column value="{!contact.Organization__c}" />
<apex:column value="{!contact.LastName}" />
</apex:pageBlockTable>
</apex:PageBlockSection>
<apex:pageBlockSection title="Household">
<apex:pageBlockTable value="{!household}" var="house">
<apex:column >
<apex:selectRadio ></apex:selectRadio> </apex:column>
<apex:column value="{!house.Name}" />
<!-- <apex:column value="{!house.npo02__Household__c }" />-->
</apex:pageBlockTable>
</apex:pageBlockSection>
<apex:pageBlockSection title="organisation">
<apex:pageBlockTable value="{!org}" var="con">
<apex:column >
<apex:selectRadio ></apex:selectRadio> </apex:column>
<apex:column value="{!con.Name}" />
<apex:column value="{!con.Street}" />
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
public with sharing class conversionrtestclass {
public list<npo02__Household__c > household=new list<npo02__Household__c >();
public list<organization> org=new list<organization>();
public list<Contact> prospect_Contact=new list<Contact>();
Prospect__c leadList =new Prospect__c();
LeadDedupUtility leadUtility;
public string id;
public Prospect__c getleadList()
{
return leadList;
}
public list <Contact> getprospect_Contact()
{
return prospect_Contact;
}
public list <Organization> getorg()
{
return org;
}
public string getid()
{
return id;
}
public list<npo02__Household__c > gethousehold()
{
return household;
}
public conversionrtestclass(ApexPages.StandardController stdController)
{
leadUtility=new LeadDedupUtility();
//this.leadList = ( Prospect__c )stdController.getRecord();
//this.id=ApexPages.currentPage().getParameters().get(id);
this.id= System.currentPageReference().getParameters().get('id');
//id= 'a0Jc00000032sxs';
system.debug('Requested ID--->'+id);
leadList =leadUtility.getProspect(id);
org=leadUtility.getorganization();
household=leadUtility.gethousehold();
prospect_Contact=leadUtility.getcontact();
//selected=FALSE;
//org=leadUtility.getorganization();
// system.debug('Requested object is--->'+org);
}
}
http://wiki.developerforce.com/page/Wrapper_Class