Last Updated on November 12, 2017 by Rakesh Gupta
Business Use Case: – Sometimes we have the requirement to auto-populate account field while creating New Task from Contact.
Solution: – Simple solution is URL Hack.
Step1 :- Click On Name | Setup | App Setup | Customize | Activities | Task Buttons & Links then click on button New Button & Link
Step 2: Label this e.g. – New Task or as per your requirement. For Display type select List button, Behavior as per your choice. For Content Source make sure to select URL
/003/e :-“003” prefix signifying that we are looking at the Contact Object.“/e” means we are going to the edit page for a new instance of the object.
retURL:- This is the URL to return to if the “Cancel” or “Save” button is clicked on the new Task page.
Who_id for “Contact” & what_id for account
Step 3:- Create URL as mentioned snapshot.
Step 4:- Save it.
Step 5:- Edit “Contact Page Page layout and click on open activities related list, as shown in below screen shot.
Select Custom button “New Task ” to display on related list & Click on Ok button, Like below screenshot
Now Save contact Page Layout. Click on Custom “New Task” Button and see the magic
Please share your idea/Comment to improve the content