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

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


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: