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

Hyperlink to create event

I'm new at this, so please be patient.

I've been reading other threads about creating a hyperlink, using an image for a button, and I'm having problems implementing this. Here's what I'm trying to do: I have a custom object called Change Management. I'd like to create a button/hyperlink that when clicked adds this record to a shared calendar. When it creates the event on the calendar it needs to use a custom field in Change Management for start date/time and end date/time. Can anyone show me the way?

Thanks much
I'm not sure I quite understand your configuration.  But in general, your custom link should be the url for the edit screen of your new record.  So if you were trying to create a new event, your url would be:

You can then pass through values to fields on that edit form.  You'll need to know the id's of the fields on the form, you can get that by viewing the page source or using the Web Developer extension in firefox.

If you explain your scenario a little more, I might be able to give you a more detailed url

Message Edited by on 10-19-2006 01:33 PM

Here's more detail on what I'm trying to do:

I have a custom object called Change Management. Change Management has a date/time field for both start time and end time. I also have a publicly shared calendar I've created. I want my users to be able to click a link in the Change Mangagement record that will pass the subject, start/end time, etc. into a new event on that shared calendar.

Thanks for your help.
There are two ways to go about doing this.  The first would be to create the URL from scratch.  You can do this by starting with the base URL and then adding parameters as needed.  When you add parameters, you want to use Merge fields from your salesforce org, not the sample values (eg {!Date__c} I've listed below.

Hope this helps.

Base URL


I'll give that a whirl. Thanks again.
Unfortunately I'm still having issues with this. Here is the link I'm trying to create:

HYPERLINK("/00U/e?evt13= {!Proposed_Start_Time__c} &retURL=%2Fui%2Fcore%2Fcalendar%2FCalendarPage%3Fcal%3DChange%2BCalendar%26cal_lkid%3D02330000000KfuX%26cal_lkold%3DChange%2BCalendar%26cal_lspf%3D1%26md3%3D298%26md0%3D2006&RecurrenceStartDateTime={!Proposed_Start_Time__c}&evt4= {!Date_Proposed__c} &evt5=  {!Date_Proposed__c}  &aid=02330000000KfuX&anm=Change+Calendar&what_id=" & {!Id} , "Create Event")

When clicked it brings me to the create new event page but doesn't pass my parameters. For example in the evt13 and evt4 fields it shows the name of my field i.e. {!Proposed_Start_Time__c} rather than putting in the start time.

Does the order of the parameters matter? And can someone explain the retURL parameter to me?

Message Edited by Selch on 10-25-2006 11:54 AM

Message Edited by Selch on 10-25-2006 12:17 PM

Try the following out:

HYPERLINK("/00U/e?evt13=" & {!Proposed_Start_Time__c} & "&RecurrenceStartDateTime=" & {!Proposed_Start_Time__c} & "&evt4=" & {!Date_Proposed__c} & "&evt5=" &  {!Date_Proposed__c} & "&aid=02330000000KfuX&anm=Change+Calendar&what_id=" & {!Id} , "Create Event")

I don't think the order of the parameters matters.  The RetURL parameter sets what screen to return to should the user cancel out of the edit screen.  You can remove it all together (as I did above) and the user will return to the Home Tab.  If you do put it back in, I'd have it set to equal the Merge Field for the Record ID of the object which you are placing the button.
I really appreciate your help. I've managed to get regular text field parameters to pass through but the date parameters just don't go. Using your link - and I get the same results in what I've written - i get: Error: Incorrect parameter for function &. Expected Text, received DateTime

This error highlights the first
{!Proposed_Start_Time__c} at the begining of the link - which will error on validation with the rest of those fields as well. My custom fields are set to be Date/Time and they're passing to Date/Time fields so I don't understand why it's having an issue with this.
Are you sure they're passing to Date/Time fields and not Date fields?  Either way, the "Expected Text" error is being reported by the Salesforce's Formula Validation.  Try using the Text() function around the date merge fields to see if that resolves it.

Sorry to interfere but IMO, there is an issue of encoding special character in the URl so you should do something like URLENCODE(your parameter). This is a known limitations of the hyperlink formulas and they are working on it.
But of course the Function URLENCODE is not available.

Message Edited by The_Fox on 10-26-2006 09:52 AM

Both my field and the field I'm trying to pass to are Date/Time. I should have wrote previously that I did try the TEXT() function but that complains that it was expecting and number and got a date. I wonder if I could create a custom date/time field in events and try to pass to that - but then again, I'm not sure if that custom date/time field would land on the calendar correctly. I guess if nothing else works I can just pass the text fields and have the users manually enter the date & time.

Bummer that this is more difficult than it should be.

This looks very helpful.  I'm not a developer, and cannot read or write programming text, but I'm facing a similar problem and I'm wondering if you can help me with it.

I would like to create an event using a HYPERLINK formula field on the Accounts page.  Using the help & training I found this hyperlink which gets me halfway there:

HYPERLINK("00U/e?retURL=%2F006x0000001T8Om&what_id=" & Id, "Create Event")

When the New Event window opens, I would like for the event date to automatically set to my custom Account merge field labelled "Filing_Deadline_2007_Calculated2__c" (currently the Date automatically sets to Today).

I would also like the Event Subject to default to "Filing Deadline", and for the Start Time to be automatically set to 9:00am.

Also, is there a way to write the hyperlink so that the new event opens in the existing window (rather than opening a new internet explorer window)?

Thank you.


Hi Matt.

That was interesting. How about type drop down list and location text box for example. What are there parameters names in the URL?



form where u have got this parameters values.

It will be very helpful for me if u share the source.

i need this bcz I want to send subject as well in parameter.

Also I have same requirment for Task object also.





If you view the standard page to create a new record and then either view the page source, use firebug, or use webdeveloper, or any other tool that can show the code behind the form, you'll be able to find the id for each field on the form and be able to pass in values as parameters in the URL for that page.