Update page include from table row action?

  • 1
  • Question
  • Updated 3 years ago
  • Answered
  • (Edited)
Is there a way to update a page include from a table row action?

I really want to use a table, not a queue.
Photo of Matt Sones

Matt Sones, Champion

  • 31,924 Points 20k badge 2x thumb

Posted 4 years ago

  • 1
Photo of Moshe Karmel

Moshe Karmel, Champion

  • 8,656 Points 5k badge 2x thumb
For the record I managed to get at some Javascript methods that can be used for this. I have a page include that I need to update with different pages and query strings depending on what search result is clicked on. "include" is the unique id of the page include.

var params = arguments[0],	$ = skuid.$;
var row = params.row; //get the page include JS object
var pageInclude = $('#include').data('object');
var pageName, queryStr;
switch(row.attributes.type){
    case "Utility_Account__c":
        pageName = 'UtilityAccountDetail_Widgets';
        queryStr = 'id=' + row.Id;
        break;
    case "Account":
        pageName = 'AccountFinanceTeam';
        queryStr = 'id=' + row.Id;
        break;
    case "Lead":
        pageName = 'LeadDetail';
        queryStr = 'id=' + row.Id;
        break;
    case "Contact":
        pageName = 'UtilityAccountDetail_Widgets';
        queryStr = 'id=' + row.Id;
        break;
} //set the page to load
pageInclude.pagename = pageName; //set the querystring params
pageInclude.querystring = queryStr; //load the page
pageInclude.load();