• sg_7
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies

Hi, The below code through a error" 'NotesAndAttachment' is not a valid child relationship name for entity Account" and i have one custom object but i don't no how it display.And the below code execute in 28.0 version,but not execute in 29.0 ,why?

 

<apex:page standardController="Account" showHeader="false"
tabStyle="account" >
<apex:stylesheet id="customstylesheet" value="customstylesheet"/>
<style>
.activeTab {background-color: yellow; color:red; font-format:italic;font-size:19pt;
background-image:none}
.inactiveTab { background-color: lightgrey; color:black;
background-image:none}
</style>
<apex:tabPanel switchType="client" selectedTab="tabdetails"
id="AccountTabPanel" tabClass="activeTab" >
<apex:tab label="Details" name="AccDetails" id="tabdetails" >
<apex:detail relatedList="true" title="true" />
</apex:tab>
<apex:tab label="Contacts" name="Contacts" id="tabContact" style="customstylesheet">
<apex:relatedList subject="{!account}" list="contacts" />
</apex:tab>
<apex:tab label="Opportunities" name="Opportunities"
id="tabOpp">
<apex:relatedList subject="{!account}"
list="opportunities" />
</apex:tab>
<apex:tab label="Open Activities" name="OpenActivities" styleClass="newlink"
id="tabOpenAct">
<apex:relatedList subject="{!account}"
list="OpenActivities" />
</apex:tab>
<apex:tab label="Notes and Attachments"
name="NotesAndAttachments" id="tabNoteAtt">
<apex:relatedList subject="{!account}"
list="NotesAndAttachment" />
<apex:tab label="customobject" name="customobject">
<apex:relatedList list="customobject__r"/>
</apex:tab>
</apex:tab>
</apex:tabPanel>
</apex:page>

 

thanks

Ramesh

  • November 11, 2013
  • Like
  • 0

Hi!

 

I want controller for below code.please help me.

 

<apex:page controller="mycustomcontroller">
    <apex:form >
        <apex:sectionHeader title="New Account" subtitle="Account Edit"/>
        <apex:pageBlock helpUrl="https://help.salesforce.com/htviewhelpdoc?err=1&id=account_edit.htm&siteLang=en_US"
                                                          helpTitle="Help for this Page" title="Account Edit" >
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton action="{!save}" value="Save"/>
                <apex:commandButton action="{!Saveandnew}" value="Save & New" id="saveAndNew"/>
                <apex:commandButton action="{!cancel}" value="cancel"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="Account information"  >
            
               
                <apex:inputField value="{!account.name}" />
                <apex:inputField value="{!Account.rating}"/>
                <apex:inputField value="{!account.parentid}"/>
                <apex:inputField value="{!Account.Phone}"/>
                <apex:inputField value="{!Account.AccountNumber}"/>
                <apex:inputField value="{!Account.Fax}"/>
                <apex:inputField value="{!Account.Site}"/>
                <apex:inputField value="{!Account.Website}"/>
                <apex:inputField value="{!Account.Type}"/>
                <apex:inputField value="{!Account.Ownership}"/>
                <apex:inputField value="{!Account.Industry}"/>
                <apex:inputField value="{!Account.NumberOfEmployees}"/>
                <apex:inputField value="{!Account.AnnualRevenue}"/>
                <apex:inputField value="{!Account.Sic}"/>
                
            </apex:pageBlockSection>   
             
            <apex:pageBlockSection title="Address Information" onclick="copy Billing Address to Shipping Address" >
                <A HREF="#" onClick="return copyAddress();">Copy  Mailing Address to Residence Address</A><br></br>
                <apex:inputField value="{!Account.BillingStreet}"/>
                <apex:inputField value="{!Account.ShippingStreet}"/>
                <apex:inputField value="{!Account.Billingcity}"/>
                <apex:inputField value="{!Account.ShippingCity}"/>
                <apex:inputField value="{!Account.Billingstate}"/>
                <apex:inputField value="{!Account.Shippingstate}"/>
                <apex:inputField value="{!Account.Billingpostalcode}"/>
                <apex:inputField value="{!Account.Shippingpostalcode}"/>
                <apex:inputField value="{!Account.Billingcountry}"/>
                <apex:inputField value="{!Account.Shippingcountry}"/>
                
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Additional Information">
                <apex:inputField value="{!Account.CustomerPriority__c}"/>
                <apex:inputField value="{!Account.SLA__c}"/>
                <apex:inputField value="{!Account.SLAExpirationDate__c}"/>
                <apex:inputField value="{!Account.SLASerialNumber__c}"/>
                <apex:inputField value="{!Account.NumberofLocations__c}"/>
                <apex:inputField value="{!Account.UpsellOpportunity__c}"/>
                <apex:inputField value="{!Account.Active__c}"/>
                
            </apex:pageBlockSection>
            
            <apex:pageBlockSection title="Description Information">
            <apex:inputField value="{!Account.Description}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

  • September 26, 2013
  • Like
  • 0

Hi!

How to add "copy Billing Address to Shipping Address" link
in the pageblocksection
in same row with section "Address Information"

  • September 26, 2013
  • Like
  • 0

Hi!

 

I want controller for below code.please help me.

 

<apex:page controller="mycustomcontroller">
    <apex:form >
        <apex:sectionHeader title="New Account" subtitle="Account Edit"/>
        <apex:pageBlock helpUrl="https://help.salesforce.com/htviewhelpdoc?err=1&id=account_edit.htm&siteLang=en_US"
                                                          helpTitle="Help for this Page" title="Account Edit" >
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton action="{!save}" value="Save"/>
                <apex:commandButton action="{!Saveandnew}" value="Save & New" id="saveAndNew"/>
                <apex:commandButton action="{!cancel}" value="cancel"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="Account information"  >
            
               
                <apex:inputField value="{!account.name}" />
                <apex:inputField value="{!Account.rating}"/>
                <apex:inputField value="{!account.parentid}"/>
                <apex:inputField value="{!Account.Phone}"/>
                <apex:inputField value="{!Account.AccountNumber}"/>
                <apex:inputField value="{!Account.Fax}"/>
                <apex:inputField value="{!Account.Site}"/>
                <apex:inputField value="{!Account.Website}"/>
                <apex:inputField value="{!Account.Type}"/>
                <apex:inputField value="{!Account.Ownership}"/>
                <apex:inputField value="{!Account.Industry}"/>
                <apex:inputField value="{!Account.NumberOfEmployees}"/>
                <apex:inputField value="{!Account.AnnualRevenue}"/>
                <apex:inputField value="{!Account.Sic}"/>
                
            </apex:pageBlockSection>   
             
            <apex:pageBlockSection title="Address Information" onclick="copy Billing Address to Shipping Address" >
                <A HREF="#" onClick="return copyAddress();">Copy  Mailing Address to Residence Address</A><br></br>
                <apex:inputField value="{!Account.BillingStreet}"/>
                <apex:inputField value="{!Account.ShippingStreet}"/>
                <apex:inputField value="{!Account.Billingcity}"/>
                <apex:inputField value="{!Account.ShippingCity}"/>
                <apex:inputField value="{!Account.Billingstate}"/>
                <apex:inputField value="{!Account.Shippingstate}"/>
                <apex:inputField value="{!Account.Billingpostalcode}"/>
                <apex:inputField value="{!Account.Shippingpostalcode}"/>
                <apex:inputField value="{!Account.Billingcountry}"/>
                <apex:inputField value="{!Account.Shippingcountry}"/>
                
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Additional Information">
                <apex:inputField value="{!Account.CustomerPriority__c}"/>
                <apex:inputField value="{!Account.SLA__c}"/>
                <apex:inputField value="{!Account.SLAExpirationDate__c}"/>
                <apex:inputField value="{!Account.SLASerialNumber__c}"/>
                <apex:inputField value="{!Account.NumberofLocations__c}"/>
                <apex:inputField value="{!Account.UpsellOpportunity__c}"/>
                <apex:inputField value="{!Account.Active__c}"/>
                
            </apex:pageBlockSection>
            
            <apex:pageBlockSection title="Description Information">
            <apex:inputField value="{!Account.Description}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

  • September 26, 2013
  • Like
  • 0