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
SF MasterSF Master 

subject field

we are getting an error when we use subject field in VIsual force page if the charatcer limit is more than 80 chars. ans suggestion how to over come?

bob_buzzardbob_buzzard

Can you tell us a little more about your problem?  Is this a standard or custom field?  Which object does it appear on?  Are you using a standard or custom controller?

 

If you can post your code tha's always useful.

SF MasterSF Master
It is a Std field on Event object. and it is std controller.
sfdcfoxsfdcfox

I believe the classic Subject data type is Text(80). Make sure you're using the latest version of the API in your Apex Code and VF pages.

SF MasterSF Master

Thank you. actuvally my code is simple.. i have written this in Version19. 

 

<apex:page standardController="Account" sidebar="false" showHeader="false" >
  <apex:sectionHeader title="Notes History"/>
      
   <apex:form > 
     <apex:pageBlock title="All Activities" >
      <apex:pageBlockButtons >
       <apex:commandButton value="Print" onclick="window.print()" />
      </apex:pageBlockButtons> 
        
        <apex:pageBlockTable value="{!Account.OpenActivities}" var="openactivity">
            <apex:column value="{!openactivity.subject}"/>         
            <apex:column value="{!openactivity.ownerid}"/>
            <apex:column value="{!openactivity.Type__c}"/>
            <apex:column value="{!openactivity.activitydate}"/>
            <apex:column value="{!openactivity.Status}"/>
            <apex:column value="{!openactivity.description}"/>
        </apex:pageBlockTable>
    
        <apex:pageBlockTable value="{!Account.ActivityHistories}" var="hist">
            <apex:column value="{!hist.subject}"/>         
            <apex:column value="{!hist.ownerid}"/>
            <apex:column value="{!hist.Type__c}"/>
            <apex:column value="{!hist.WhoId}"/>
            <apex:column value="{!hist.activitydate}"/>
            <apex:column value="{!hist.Status}"/>
            <apex:column value="{!hist.description}"/>
        </apex:pageBlockTable>
     </apex:pageBlock>
     
     <apex:pageBlock title="Opportunities">
       <apex:pageBlockTable value="{!account.Opportunities}" var="opp">
         <apex:column value="{!opp.Name}"/>
         <apex:column value="{!opp.Description}"/>
       </apex:pageBlockTable>
     </apex:pageBlock>
   
   </apex:form>
</apex:page>