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
hendrjhendrj 

Automatically populating Related To task field with Account Name

I have been trying to automatically populate the "Related To" field on the task view with the Account Name using a custom link. Currently it is a drop down and then you have to search for the account name. The account name appears on the contact view (where I created the task from).

I am using this formula but am receiving an error, any help would be appreciated.

 

 

https://emea.salesforce.com/00T/e?retURL=%2F00320000001jWar&who_id=00320000001jWar&what_id={!Account_ID}

 

 

Unable to Access Page
The value of the "what_id" parameter contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and resubmit. If the error still persists, report it to our Customer Support team. Provide the URL of the page you were requesting as well as any other related information.
Back

 

Best Answer chosen by Admin (Salesforce Developers) 
dmchengdmcheng

URL links should not include the domain.  Your formula should be

 

/00T/e?who_id={!Contact.Id}&retURL=%2F{!Contact.Id}&what_id={!Account.Id}

 

this works for me.

All Answers

dmchengdmcheng

If this a custom button on the Account object, then the merge field should be {!Account.Id}

hendrjhendrj

I still get the same error. I have this custom link on the contact page. I want to select this link on the contact page and have it open a task and populate the account field in "related to" pick list.

dmchengdmcheng

URL links should not include the domain.  Your formula should be

 

/00T/e?who_id={!Contact.Id}&retURL=%2F{!Contact.Id}&what_id={!Account.Id}

 

this works for me.

This was selected as the best answer
hendrjhendrj

Thank you! That worked.  I have another similar question.

 

I have created a custom text field on the contact screen called ownership type. I would like the populated ownership type field to appear on the task screen in read only format. Is this possible?