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
BrandiTBrandiT 

Possible to reference an anchor in a custom button?

We have a custom button to create a new task from the related list of the contact page with certain parameters populated.  

 

Is it possible to put something in this so that when we save,  it jumps back to the related list (activity history) on the the contact page instead of the top of the contact page?  Similar to using an anchor in an html page.  Maybe by adding a saveurl to the link?

 

Here is the custom button code:

 

/00T/e?RecordType=012A000000115gz&who_id={!Contact.Id}&retURL=%2F{!Contact.Id}&tsk12=Completed&{!Task.Complete_Date__c}={!TODAY()}

 

Thank you!

Best Answer chosen by Admin (Salesforce Developers) 
srikanth123srikanth123

you are having the retUrl parameter value in the button code as follows

retURL=%2F{!Contact.Id}modify

Change this to

retURL=%2F{!Contact.Id}%23{!Contact.Id}%5FRelatedHistoryList%5Ftarget