+ 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;