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
cvbcvb 

pls tell me urgent

Account  sobject here two record types (1= test1 (2=test2 but my requirement is Annuaval Revenue field is hide on test2 account but override the buttons new ,view, edit

Shiv ShankarShiv Shankar

1. You have two record types. for these both reocrdtypes you have two layouts also. 

2. Remove the Annuaval Revenue field from the layout which you are using for test2 reocrd type.

cvbcvb

hey siva i create vf page for account obj and override the buttons new,view,edit

Subha ASubha A
In the URL you will find attribute called RecordType . It is the Id of the recordtype.. so in the controller of your page check with the Id of the record type and set a boolean accordingly which can be used for rendered option wherever required
cvbcvb

<apex:page Standardcontroller="Account"  sidebar="false" showHeader="true" tabStyle="Account">
<apex:image value="{!$Resource.Acc}" width="25" height="25"/>
<apex:form >Account Edit<br/>
<h4><b>New Account</b></h4>
<apex:pageBlock title="Account Edit" >
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!Save}"/>
<apex:commandButton value="Cancel" action="{!Cancel}"/>
 </apex:pageBlockButtons>
    <apex:tabPanel id="theTabPanel" selectedTab="one" switchType="client" >
        <apex:tab label="Account Information"  id="One" >
        <apex:pageBlockSection >
          <b>Account Owner</b><apex:commandLink value="{!$User.FirstName}{!$User.LastName}" action="https://ap1.salesforce.com/home/home.jsp"/
        <apex:repeat value="{!$ObjectType.Account.FieldSets.Account_information}" var="af">
                <apex:inputfield value="{!Account[af]}">
            </apex:inputfield></apex:repeat>
             </apex:pageBlockSection>
         </apex:tab>
       <apex:tab label="Adress information" name="Two" id="Two">
        <apex:pageBlockSection >
          <apex:repeat value="{!$ObjectType.Account.FieldSets.Address_information}" var="af">
                <apex:inputfield value="{!Account[af]}">
            </apex:inputfield></apex:repeat>
        </apex:pageBlockSection>
       </apex:tab>
         <apex:tab label="Additional Information"  id="three">
        <apex:pageBlockSection >
       <apex:repeat value="{!$ObjectType.Account.FieldSets.Additional_information}" var="af">
                <apex:inputfield value="{!Account[af]}">
            </apex:inputfield></apex:repeat>
        </apex:pageBlockSection>
        </apex:tab>
        <apex:tab label="Description Information"  id="four">
        <apex:pageBlockSection >
        <apex:repeat value="{!$ObjectType.Account.FieldSets.Description_information}" var="af">
                <apex:inputfield value="{!Account[af]}">
            </apex:inputfield></apex:repeat>
</apex:pageBlockSection>
         </apex:tab>
          </apex:tabPanel>
    </apex:pageBlock>
</apex:form>   
</apex:page>