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
vtkstefvtkstef 

Pre-filling field values for $Action.Activity.NewTask

Hi,

I am constructing a URL with the merge variable $Action.Activity.NewTask, so that when I click it, a new task page is displayed.

I would like to pre-fill as many fields as possibles, by setting field values as URL parameters.

I know about what_id= and who_id= but I could not find other fields that could be explicitly named as a parameter (Subject for example). I scoured the discussion forums and I have found people using <input id=##########  number to successfully set other fields (for example in my custom object, the From field has an <input> id of 00N70000002Fuyw so if I want to prefill 'From' field with the value of foo I send this URL: https://na5.salesforce.com/a02/e?retURL=%2Fa02%2Fo&00N70000002Fuyw=foo

Is there a merge valrable that can get me these ids? Or is there any metadata I could query to get these form field id's? Or am I to inspect the html itself to discover such Id's (as I did in my example above)?

Ciao
Stefano
 
chrissy2007chrissy2007
Try using the variable tsk#= and filling in an actual number (e.g. 1, 2, 3) where the # sign is.
 
Plugging them onto the end of the task URL will update the related task.
 
For example, adding &tsk10= allows you to change the Task Type (e.g. &tsk10=Call -->the Type of "Call"), or &tsk12= changes the Status (e.g. &tsk12=Completed --> a status of "Completed").
 
You will need to create a custom s-control to override the current Log a Call or New Task buttons.  Here is a related message board that I found helpful: http://community.salesforce.com/sforce/board/message?board.id=Non-Profits&message.id=510
 
Chrissy