You need to sign in to do that
Don't have an account?
sawaji varun
How to insert custom activities to accounts
I have ceated to fields Mobile Number and SMS Description using VF Page. I'm able to create the task, When I click the button submit, these to field details added to activities in account. How to do it.Please anybody help me on this.
yes - go to setup - click on customize, activities, activity custom fields - enter the field that you need
- remember activity fields can appear on events and tasks so be sure and think thru your change
Can you please share your code here, so that we can understand you correctly.
Thanks,
VF Page
<apex:page standardController="Task" extensions="CBD_SendSMS" sidebar="false" >
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection columns="2">
<apex:inputfield value="{!tsk.Mobile_Number__c}"/>
<apex:inputTextarea value="{!tsk.SMS_Description__c}"/>
<!--<apex:inputField value="{!tsk.Lead_Lookup__c}"/>
<apex:inputField value="{!tsk.Account_Lookup__c}"/>
<apex:inputField value="{!tsk.Opportunity_Lookup__c}"/>-->
</apex:pageBlockSection>
<apex:commandButton value="Send SMS" action="{!sendSMS}" style="margin-left:600px;width=50px;height=30px"/>
</apex:pageBlock>
</apex:form>
</apex:page>
Apex Class
public with sharing class CBD_SendSMS {
public Task tsk{
get {
if (tsk == null)
tsk = new Task();
return tsk;
}
set;
}
public PageReference sendSMS() {
// Integer fPhone=tsk.Mobile_Number__c;
// if (fphone.length() != 10) {
// tsk.addError('Error1');
// }
Id id1= System.currentPageReference().getParameters().get('Id');
tsk.WhatId = id1;
tsk.RecordtypeId = '012p00000004O5k';
insert tsk;
pageReference pageref= new pageReference('/' + tsk.Id);
Task tsk = new Task();
return pageref;
}
public CBD_SendSMS(ApexPages.StandardController controller)
{
this.tsk = (Task)Controller.getRecord();
}
}