Skip to main content The Trailblazer Community will be unavailable from 2/1/2025 to 2/2/2025. Please plan your activities accordingly.
error

We made a wrong turn. Try again.

Hello,

  I am the admin for a company that has an instance of SFDC that has a lot of customizations and my experience with apex is minimal, so until now i have been making a lot of declarative changes to complete tasks that are given to me. Most recently, i have been asked to not let anyone back date calls that they are making. I am hoping it is a subtle change to the code that i can make. Also, i will be using a Sandbox enviroment to test the changes. Here are some screen shots to give you an idea of my under standing of what is happening with the code. First is a screen shot of what the log a call VF page looks like to the end users. Second is what i am presuming to the be the code that makes that page. Also, would it be difficult to remove the reminder date/ time and reminder notes fields?

 I am open to all suggestions and words of wisdom that may help me understand why this works the way it does. 

Thanks in advance,

Matt

User-added image

User-added image
5 answers
  1. Feb 23, 2016, 8:00 PM
    Hi Matt - sorry... validation rule will go on the Task... not the lead.

    Try this code:

    <apex:page standardController="Task" extensions="TasksExtention" showHeader="true" tabStyle="Lead">

    <style>

    .activeTab {background-color: ⌗236FBD; color:white;

    background-image:none}

    .inactiveTab { background-color: lightgrey; color:black;

    background-image:none}

    </style>

    <apex:form >

    <apex:pageBlock title="Log a Task"> <apex:pageMessages ></apex:pageMessages>

    <apex:pageBlockSection >

    <apex:inputField value="{! Task.Ownership__c}" label="Take Ownership of This Lead" rendered="{!CheckOwnership}"/>

    </apex:pageBlockSection>

    <apex:pageBlockSection >

    <apex:inputField value="{! Task.Type}" required="true"/>

    <apex:inputField value="{! Task.ActivityDate}" required="true"/>

    <apex:inputField value="{! Task.Rating__c}"/>

    <apex:inputField value="{! Task.Description}" style="width:90%; height:250%" required="true"/>

    <!--<apex:inputField value="{! Task.Why no Appt}"/>-->

    </apex:pageBlockSection>

    <apex:pageBlockSection columns="1" showHeader="false">

    <apex:outputText label=" " style="font-weight:800" value="Update the Ad Series if the lead/contact is responding to advertising."></apex:outputText>

    <apex:pageBlockSectionItem >

    <apex:outputLabel value="Ad Series" for="AdSeries"></apex:outputLabel>

    <apex:selectList id="AdSeries" value="{!Task.Ad_Series__c}" size="1" title="Ad Series">

    <apex:selectOptions value="{!AdSeries}"></apex:selectOptions>

    </apex:selectList>

    </apex:pageBlockSectionItem>

    </apex:pageBlockSection>

    <apex:pageBlockButtons >

    <apex:commandButton action="{!saveTask}" value="Save"/>

    <apex:commandButton action="{!saveTaskAndEmail}" value="Save & New Email"/>

    <apex:commandButton action="{!cancel}" value="Cancel"/>

    </apex:pageBlockButtons>

    </apex:pageBlock>

    </apex:form>

    </apex:page>

     
0/9000