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
MasieMasie 

URL Hack to create a new event with prepopulated fields

Hi

I am trying to create a custom button that will create a new event with a prepopulated field but I keep getting the error that my url is not valid. Can someone please help. Here is the URL.

https://cs18.salesforce.com/00U/e?who_id={!Case.AccountId}&what_id={!Case.Id}&retURL=%2F{!Case.Id}&RecordType=0122000000061K7&ent=Event&evt6={!Case.Description}
Best Answer chosen by Masie
bob_buzzardbob_buzzard
Not through the URL.  I think you'd have to use a trigger for this, as workflow (a) won't be able to handle the polymorphic nature of the relationship and (b) has pretty limited cross object field update support.

All Answers

bob_buzzardbob_buzzard
Do you see this error when you attempt to save the button, or when you click on the button?  I.e. is this the url in the browser's location bar when you see the error, or in the editor panel?
MasieMasie
Hi bob_buzzard

it was in editor panel but I saved it and it works. Thanks
MasieMasie
One question though can I specify a field that will be populate onto my case object when the event saves?
bob_buzzardbob_buzzard
Not through the URL.  I think you'd have to use a trigger for this, as workflow (a) won't be able to handle the polymorphic nature of the relationship and (b) has pretty limited cross object field update support.
This was selected as the best answer
Josh Davis 13Josh Davis 13
Note to future: Lightning experience does not allow URL hacks.