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
RajashriRajashri 

How to insert/Update the Activity History Subject based on the button click

Hi.

I am new to SFDC. i have a requirement that on button click, create the activity to Activity History table with subject line  "Left" value.
Can anyone please tell me how to do it?

 <apex:commandButton value="VM1"  action="{!vm1insert}"/>   

public with sharing class singleListView {
public PageReference vm1insert() {
        return null;
    }
}
ShashankShashank (Salesforce Developers) 
This page has some sample code, which you can modify for your need: http://salesforce.stackexchange.com/questions/27360/create-a-button-in-vf-page-that-creates-a-new-case-with-certain-record-type