Blog, Development, Howto

Pass DateTime parameters to set field record values

Today I got requirement to open new record form with prepopulated DateTime field. This article describes how to pre-set Date field:

The following sample sets the Est. Close Date field for a new opportunity to January 31, 2011. The unencoded value for the extraqs parameter is “estimatedclosedate=01/31/11”.

No single word about time component. Luckily I found a way to make it work. Format that should be used is following – M/d/yyyy H:m:s, something like to 1/31/2011 15:6:0.

Here is the code snippet you can use to open new task for prepopulating Due Date field with the same time as now plus 1 day:


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.