Guest User

Untitled

a guest
Oct 21st, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. <apex:includeScript value="/support/console/34.0/integration.js"/>
  2. function openSTab(){
  3. var tid;
  4. var pg;
  5. var cid ='{!case.id}';
  6. if(sforce.console.isInConsole){
  7. sforce.console.getEnclosingPrimaryTabId(fetchTabId);
  8. }
  9. function fetchTabId(result){
  10. tid = result.id;
  11. pg = '/apex/ChildPage?id='+cid;
  12. sforce.console.getEnclosingTabId(openTab);
  13. }
  14. function openTab(result){
  15. sforce.console.openSubtab(tid,pg,true,'test',null,undefined,'test');
  16. }
  17. }
  18.  
  19. <apex:commandButton onclick="openSTab()"/>
Add Comment
Please, Sign In to add comment