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
Dean Wooldridge 6Dean Wooldridge 6 

url hack to create new 'case' from contact form

So I'm on the Contact form, Case related list.  I click 'New' and get this in the URL:

/500/e?retURL=%2F0031a00000CYVQu&def_contact_id=0031a00000CYVQu&def_account_id=0011a00000EfLlb

So I'm thinking this ought to be easy to do.  I did it for the Account, a URL hack to create a new case.  It looked like this:

/500/e?def_account_id={!Account.Id}&retURL={!Account.Id}


But my setup to do it from the Contact form is just not working - Salesforce says there is no Account reference so I can't do this:

/500/e?retURL={!Contact.Id}&def_contact_id={!Contact.Id}&def_account_id={!Contact.AccountId  }}

or any variation of that.  Any thoughts?  I want to pass over both the account and contact defaults.

Appreciate any assistance.
 
SrikanthKuruvaSrikanthKuruva
for the contact just use 
/500/e?retURL={!Contact.Id}&def_contact_id={!Contact.Id}
The Account gets autopopulated once the record is saved.

let me know if this helps.
Dean Wooldridge 6Dean Wooldridge 6
Well there is always a very high possibility that I did something wrong but leaving out the default for Account ID just gets me the error message "Error: You must enter a value"