April, 2016
Salesforce: Service console page – opening in a sub-tab
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
VFP: <apex:commandButton onclick="openTab('{!case.id}'); return false;" value="My awesome page" /> Javascript: <script> var openSecondaryTab = function openTab(objectId) { url = '/apex/mypage'; url = url+'?caseId='+objectId; if(!sforce.console.isInConsole()) window.parent.location.replace(url ); else sforce.console.getEnclosingPrimaryTabId(function(result) { var recordname =name; sforce.console.openSubtab(result.id, url , true, recordname,null); }); } |
Favorite
Selector using contain Id in Jquery
1 2 3 4 5 |
function detailTRSelected() { $("[id*='parent']").click(function(){ $(this).addClass("selected").siblings().removeClass("selected"); }); } |
Favorite
Selector using Class in JQuery
1 2 3 |
$.each($('.thePanel'), function() { var myid = this.id; }); |
Favorite
Jquery Selectors
Following are the Jquery selectors:
1 2 3 4 5 6 |
^= is starts with $= is ends with = is exactly equal != is not equal *= is contains |
Favorite