You need to sign in to do that
Don't have an account?
Detail tag in sites
HI,
I tried to use the detail tag in sites and tried to get account detail and it is not showing the detail. The account is customer/prospect.. Below is my code
<
apex:page standardcontroller="Account" extensions="AccountDisplayController" sidebar="false" >
<apex:variable var="acc" value="{!currentAcc}" />
<apex:form >
<apex:outputpanel rendered="true">
<apex:detail subject="{!acc.Id}" relatedList="true" rendered="true" showChatter="true" title="true"/>
</apex:outputpanel>
</apex:form>
</apex:page>
*****************************************
public
classAccountDisplayController {
public string lpidValue = ApexPages.currentPage().getParameters().get('lValue');
publiclist<Account> accList{get;set;}
publicAccountcurrentAcc;
publicAccountDisplayController(ApexPages.StandardController controller){
list<Account> accl = getAccDetails();
currentAcc = accl[0];
}
publiclist<Account> getAccDetails(){
accList = [
SELECTName, Phone FromAccountWHERELegal_Person_id__c =:lpidValue ];
//currentAcc = accList[0];//system.debug('account in getAccDetails: '+currentAcc);returnaccList;
}
publicAccountgetcurrentAcc(){
system.debug('account in getcurrentAcc(): '+currentAcc);
returnthis.currentAcc;
}
}
No Issues.. I found solution