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
Dennis Papp 7Dennis Papp 7 

Trying to create new button to go to new event layout for scheduling demos

I was trying to link my users to a salesforce edit screen using the new layout where a user can input data. 
This link I pulled doesn't work..

https://na60.salesforce.com/00U/e?who_id=0013000000etHLG&what_id=006a000001OwOTE&retURL=%2F006a000001OwOTE&RecordType=0120c000001NfRl&ent=Event

I believe I need the record type specified but What is the structure that I need to use for my link?  Do I need the who_id and the whatid?
 
kevin lamkevin lam
The value for the who_id parameter in your URL is an account (with a key prefix of 001), but it should be either a contact (with a key prefix of 003) or a lead (with a key prefix of 00Q).
Dennis Papp 7Dennis Papp 7
It's actually supposed to be a new event that should be linked to an account or opportunity..  what are the key prefixes for each type?
kevin lamkevin lam
Then you just need to set the what_id parameter to either the account or opportunity Id.

If it's an opportunity id, then the AccountId field of the event will automatically be set to the accountid of the opportunity when the event is saved.