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
lakslaks 

Opening Task creation screen from Visualforce page

How can I open a Task creation screen from a button in Visualforce page ?

Basically I have a "Log a Call" button in my VF page, and on click of it I want to open the Log a call/Task screen.

 

Can anybody provide some input on this.

 

Regards,

Lakshmi.

sivaextsivaext

Hi

 

suppose

<apex:commandButton value="newTask" action={!method} />

 

inside controller method 

 

Pagereference pg=new PageReference('/00T/e?what_id='+related id of task(account, opportunity etc )+'&retURL=%2F'+related id of task(account, opportunity etc )+'');

pg.setRedirect(true);

return pg;