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

Default Due Date for a Custom Button to create a new task

I am cereating a button that will create a new task.  Is there a way to default the 'Due Date' to Today and also have the record automatically save?  I am using 'tsk4' to try and default due date but its not working. Here is my code.  Thanks{!Account.Id}&what_id={!Opportunity.Id}
&tsk4 ={!TODAY()}
&00N70000002OQDq=Left Message
&tsk6=Left Message




tsk4 should be correct; it works in my test organization.


"Save" should be "save" (all lower-case).


You should consider using URLFOR to generate the correct link, as it makes the overall code easier to read and shorter, plus if an update changes one of those URLs, it won't break your button as easily.


Thanks for the reply.  For some reason tsk4 is not working for me.  Also can you send an example of 'urlfor'......I'm not familiar with that function. 

Marty Y. ChangMarty Y. Chang

Hello, noreaster,


You may also want to consider promoting this idea: Default value for Task "Due Date"

Brandon FeatherBrandon Feather
I was able to achieve this by breaking up the date: