• Matthew Schetselaar
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
I've got a custom button that Executes JavaScript to open a new tab in the console or open an external page if not in the console.  It is working pretty good but I've named the console tab with the Account Name.  It works fine unless there is an apostraphe or other escape character.  Is there a way to either comment the apostraphe out or ignore it or something?

Here is the button code:

{!requireScript("/support/console/29.0/integration.js")}

if (typeof(srcUp) == 'function') {
sforce.console.getEnclosingPrimaryTabId(function openSubtab(result){sforce.console.openSubtab(result.id, 'https://www.outsidelink.com', true, 'Admin for {!Account.Name}');});
} else {
window.open('https://www.outsidelink.com}');
}