Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /nfs/c01/h06/mnt/3807/domains/sfdc.arrowpointe.com/html/wp-content/plugins/ultimate_ga.php on line 524

Open custom links in the same window without creating nested frames


Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /nfs/c01/h06/mnt/3807/domains/sfdc.arrowpointe.com/html/wp-content/plugins/ultimate_ga.php on line 524
Share

If you use custom links regularly, you know about this issue. It’s an issue when you decide to open custom links in the existing window rather than a popup window. You can get nested frames where the entire Salesforce.com application is within the frame where the data should reside like in the screen shot below. For this screen shot, I had a custom link from the Account Page Layout to a specific report. I chose to Open in Salesforce window without sidebar.

nested_frames.png

If I run the custom link 3 times in a row, my screen now looks like this.

nested_frames2.png

You get the idea.

Because of this issue, many people opt for using pop-up windows instead. This can be somewhat annoying to an end user, though. We have pop-up blockers now because people don’t like this. Why open another window? You can fix this problem, by using a simple S-Control for your custom link rather than using a direct URL. All you need to do is copy the code below. Where it says {URL GOES HERE}, replace that with the same URL you put in your Custom Link.

< script language="JavaScript">

function redirect()
{
parent.frames.location.replace(“{URL GOES HERE}”);
}

redirect();

< /script >

Note: In order for the code to appear on this blog post I had to add a space in the < script> and < /script> tags. You’ll need to remove those spaces too.

Combine this trick with my old post about Auto-creating reports from web links to do some dynamic reporting right from record (e.g. run an Activity History report for a specific account right from the Account page).


Warning: count(): Parameter must be an array or an object that implements Countable in /nfs/c01/h06/mnt/3807/domains/sfdc.arrowpointe.com/html/wp-includes/class-wp-comment-query.php on line 399

7 Comments »


  1. Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /nfs/c01/h06/mnt/3807/domains/sfdc.arrowpointe.com/html/wp-content/plugins/ultimate_ga.php on line 524
    Ian H Said,

    May 13, 2006 @ 1:33 pm


    Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /nfs/c01/h06/mnt/3807/domains/sfdc.arrowpointe.com/html/wp-content/plugins/ultimate_ga.php on line 524

    Here’s another way to get a similar result more easily… just add isdtp=mn to the end of you URL

    e.g. http://www.yourlink.com?isdtp=mn


  2. Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /nfs/c01/h06/mnt/3807/domains/sfdc.arrowpointe.com/html/wp-content/plugins/ultimate_ga.php on line 524
    Scott Hemmeter Said,

    May 13, 2006 @ 6:44 pm


    Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /nfs/c01/h06/mnt/3807/domains/sfdc.arrowpointe.com/html/wp-content/plugins/ultimate_ga.php on line 524

    Ian, I tested your idea and it worked. If you use isdtp=mn as the first parameter, then it’s ?isdtp=mn. Anything after that must be &isdtp=mn.

    What does that parameter actually mean? How do the values translate?


  3. Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /nfs/c01/h06/mnt/3807/domains/sfdc.arrowpointe.com/html/wp-content/plugins/ultimate_ga.php on line 524
    lee byrne Said,

    May 25, 2006 @ 9:30 am


    Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /nfs/c01/h06/mnt/3807/domains/sfdc.arrowpointe.com/html/wp-content/plugins/ultimate_ga.php on line 524

    Scott – I get a SFDC error when I try your code – here’s what it looks like:

    function redirect()
    {
    parent.frames.location.replace(”{https://na1.salesforce.com/800/e?retURL=%2F800%2Fo&ctrc7={!Account_Name}&00N30000000m137={!Opportunity_Amount}&ctrc25street={!Account_BillingStreet}&ctrc25city={!Account_BillingCity}&ctrc25state={!Account_BillingState}&ctrc25zip={!Account_BillingPostalCode}&00N30000000oxTH={!Opportunity_Name}&00N30000000m13D={!Opportunity_Renewal_Amount}&00N30000000lyYb={!Opportunity_of_Seats}&ctrc13={!Opportunity_Owner_Expiration_Notice}&ctrc5={!Opportunity_Start_Date}&00N30000000m13P={!Opportunity_End_Date}&00N30000000lyYd={!Opportunity_Billing_Term}&SpecialTerms={!Opportunity_Special_Terms}&Description={!Opportunity_Description}&00N30000000lyYZ={!Opportunity_Type}&00N300000019se2={!OpportunityOwner_FullName}}”);
    }

    redirect();

    I’m no java guy – did I mess this up?


  4. Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /nfs/c01/h06/mnt/3807/domains/sfdc.arrowpointe.com/html/wp-content/plugins/ultimate_ga.php on line 524
    Scott Hemmeter Said,

    May 26, 2006 @ 12:06 am


    Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /nfs/c01/h06/mnt/3807/domains/sfdc.arrowpointe.com/html/wp-content/plugins/ultimate_ga.php on line 524

    Lee – remove the { and } that surround your URL.


  5. Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /nfs/c01/h06/mnt/3807/domains/sfdc.arrowpointe.com/html/wp-content/plugins/ultimate_ga.php on line 524
    Kevin Laurence Said,

    June 23, 2006 @ 9:06 am


    Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /nfs/c01/h06/mnt/3807/domains/sfdc.arrowpointe.com/html/wp-content/plugins/ultimate_ga.php on line 524

    Salesforce has published a “solution” on this topic titled:

    Opening a Custom Link in the parent frame created a double strip of tabs?

    But there is an error in their javascript. They are missing the final semicolon on what is your fourth line (“parent.frames.location.replace…”).

    I couldn’t get their code to work in Firefox. Yours worked.


  6. Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /nfs/c01/h06/mnt/3807/domains/sfdc.arrowpointe.com/html/wp-content/plugins/ultimate_ga.php on line 524
    Alex S. Said,

    April 17, 2008 @ 7:14 pm


    Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /nfs/c01/h06/mnt/3807/domains/sfdc.arrowpointe.com/html/wp-content/plugins/ultimate_ga.php on line 524

    I got an “Illegal character” error in Firefox. We fixed it by replacing the double quotes around the URL with single quotes.


  7. Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /nfs/c01/h06/mnt/3807/domains/sfdc.arrowpointe.com/html/wp-content/plugins/ultimate_ga.php on line 524
    Activities Tab in Salesforce | X-Squared On-Demand Said,

    August 5, 2008 @ 9:36 am


    Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /nfs/c01/h06/mnt/3807/domains/sfdc.arrowpointe.com/html/wp-content/plugins/ultimate_ga.php on line 524

    […] Scott Hemmeter blogged about this a while back and included some javascript to get around the double-tabs […]

RSS feed for comments on this post · TrackBack URI

Leave a Comment

All comments are moderated. Other visitors will not see your comment until it has been approved.


Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /nfs/c01/h06/mnt/3807/domains/sfdc.arrowpointe.com/html/wp-content/plugins/ultimate_ga.php on line 524

Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /nfs/c01/h06/mnt/3807/domains/sfdc.arrowpointe.com/html/wp-content/plugins/ultimate_ga.php on line 524