I have a custom button on Lead, "Log A Call", that pops a new window. The new window is the Task object edit page.

Currently "Log A Call" button pops: /00T/e?title=Call&who_id={!Lead.Id}&followup=1&tsk5=Call&retURL=/{!Lead.Id}

I want this same page to pop without the sidebar and header.

I thought to change the "Log A Call" button to display a Visualforce page, that has a pageReference to the url, and I would set header and sidebar = false.

<apex:page showHeader="false" sidebar="false" controller="LogACallLeadController" action="{!goToTask}"></apex:page>

public class LogACallLeadController {
    public PageReference goToTask() {
    Id currentLeadId = ApexPages.currentPage().getParameters().get('id');
    PageReference pageRef = new PageReference('/00T/e?title=Call&who_id='+currentLeadId+'&followup=1&tsk5=Call&retURL=/' + currentLeadId);
    return pageRef.setRedirect(true);

This works but the header and sidebar are still visible. This is happening because of the redirect.

Is there a way to reference the specific URL in the visualforce page without using a redirect? Or is there an easier way to pop a new page with no sidebar or header of a standard object?

I also tried using on the Standard Task object but it does not recognize the ownerId.

I also tried adding in: ?isdtp=mn to my URL with no success /00T/e?title=Call&who_id={!Lead.Id}&followup=1&tsk5=Call&retURL=/{!Lead.Id}?isdtp=mn

Custom Button - Log A Call

Button Populates this page WITH A HEADER AND SIDE BAR

I would like to populate the page with NO header and side bar

  • can you put a picture of the issue you are facing Jun 29, 2017 at 21:43
  • @SantanuBoral I updated with pictures. The first picture displays the custom button on the Lead object. The second picture displays the page I that pops when I click on the button. I want this page to populate in a new window with no header and sidebars. The third picture is the custom button URL with the ?isdtp=mn on the end. I have tried a few different ways to get rid of the header and sidebar with no luck.
    – Olivia
    Jun 29, 2017 at 21:55

1 Answer 1


Following code behind javascript button works for me, it is opening new window without sidebar and header.

var pageUrl = '{!URLFOR($Action.Activity.LogCall)}'; 
var parameters = '?title=Call&who_id={!Lead.Id}&isdtp=mn'; 
var link = pageUrl + parameters; 
  • This works great! I am a little confused on the Activity.LogCall part and the title=Call&who_id. Do you have any documentation on these url patterns? Is this a standard way of populating a Activity page?
    – Olivia
    Jun 29, 2017 at 22:31
  • In formula window, select Field Type as $Action, it will list down of default salesforce provided actions. Btw, I have broken down URL and parameters in 2 parts Jun 29, 2017 at 22:34
  • Interesting! So for the formula: {!URLFOR(target, id, [inputs], [no override])} - Activity.LogCall would be the target and there would be no id, inputs, or override?
    – Olivia
    Jun 30, 2017 at 12:16
  • @Santau - I am not sure if you will get this but I am just curious about the "why" behind adding the isdtp to the end of the Log A Call button. Why won't this work: /00T/e?title=Call&who_id={!Lead.Id}&followup=1&tsk5=Call&retURL=/{!Lead.Id}?isdtp=mn ?
    – Olivia
    Jul 6, 2017 at 18:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .