Guest User

Untitled

a guest
Jul 19th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. <apex:page standardController="Task" extensions="LogACallControllerExtension">
  2. <apex:sectionHeader title="Log a Call" />
  3. <apex:form id="pageForm">
  4. <apex:pageBlock title="Task Edit" mode="edit">
  5. <apex:pageBlockButtons location="both">
  6. <apex:commandButton value="Save" action="{!save}" />
  7. <apex:commandButton value="Cancel" action="{!cancel}" />
  8. </apex:pageBlockButtons>
  9. <apex:pageBlockSection title="Call Information" columns="2" collapsible="false">
  10. <apex:inputField value="{!Task.OwnerId}"/>
  11. <apex:outputField value="{!Task.WhatId}"/>
  12. <apex:inputField value="{!Task.Subject}"/>
  13. <apex:outputField value="{!Task.Status}"></apex:outputField>
  14. <apex:inputField value="{!Task.ActivityDate}"/>
  15. <apex:inputfield value="{!Task.Activity_Type__c}"required="true"/>
  16. <apex:inputfield value="{!Task.Description}"style="width:400px;height:100px;"/>
  17. </apex:pageBlockSection>
  18. </apex:pageBlock>
  19. </apex:form>
  20. </apex:page>
  21.  
  22. public class LogACallControllerExtension {
  23. public Task task {get; set;}
  24. public LogACallControllerExtension(ApexPages.StandardController controller) {
  25. this.task = (Task)controller.getRecord();
  26. task.whoId = ApexPages.currentPage().getParameters().get('id');
  27. task.activitydate = Date.today();
  28. task.Status='Completed';
  29. task.Activity_Type__c='NA';
  30. task.IsReminderSet=true;
  31. task.ReminderDateTime=System.now();
  32. }
  33. }
Add Comment
Please, Sign In to add comment