function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
punnoosepunnoose 

How dou get billing city

 
How do u get the billing city,Phone is working correctly   

*******************************

<apex:pageBlockTable value="{!accounts}" var="a">

<apex:column headerValue="Phone">           
                    <apex:outputText value="{!a.Phone}"/>
                </apex:column>

  <apex:column headerValue="City">           
                    <apex:outputText value="{!a.BillingAddress.BillingCity}"/>
                </apex:column>


**********************************

             

AravindBabu512AravindBabu512

Hi,

 

You can get it directly from account object as account.billingcity. So a.BillingCity in the column City will work.

 

Thanks,

Aravind

asish1989asish1989

Hi 

  Try this..

 

<apex:page standardController="Account" recordSetVar="accounts" readOnly="true">
<apex:form>
<apex:pageBlock>
<apex:pageBlockTable value="{!accounts}" var="a">
<apex:column headerValue="Phone">
<apex:outputText value="{!a.Phone}"/>
</apex:column>
<apex:column headerValue="City">
<apex:outputText value="{!a.BillingCity}"/>
</apex:column>
</apex:pageBlockTable>

</apex:pageBlock>
</apex:form>
</apex:page>

 

Thanks

asish