Skip to main content

Skuid on Salesforce

yesterday we noticed that skuid in console wasn’t working  from the utility bar (omnichannel bar).  Our Skuid expert (who only works at night) said it was due to “they added dependency on integration.js file of salesforce console.”.  Well today, none of our buttons work, which means we can’t print disclosures, or send emails, or create new loans, etc.  The code for the buttons looks like this:

var params = arguments 0],
$ = skuid.$;

console.log(‘Clicked’);
if(sforce.console && sforce.console.isInConsole()){
    

console.log(‘In Console’);
sforce.console.openPrimaryTab(null, ‘our_domain/apex/loop__looplus?sessionId=’+skuid.utils.userInfo.sessionId+‘… Docs Nintex-’+params.row.Id, openSuccess, ‘Loan Docs Nintex’+params.row.Id);
var openSuccess = function openSuccess(result) {
    if (result.success == true) {
console.log(‘success’);
    
    } else {
console.log(‘Not success’);
        var newwindow=window.open(‘our domain/apex/loop__looplus?sessionId=’+skuid.utils.userInfo.sessionId+‘… Docs Nintex’,‘_blank’,‘scrollbars=yes,toolbar=no,status=no’);
        newwindow.focus();
    }
};    
}else{
    
console.log(‘Not in Console’);
    var newwindow=window.open(‘our domain/apex/loop__looplus?sessionId=’+skuid.utils.userInfo.sessionId+‘… Docs Nintex’,‘_blank’,‘scrollbars=yes,toolbar=no,status=no’);
    newwindow.focus();
}


Any ideas?


I’m having a very similar issue with Javascript snippet buttons ceasing to function. It started a couple of weeks ago and our technical team finally shrugged their shoulders and said I should go the forums. Our code is as follows: 


var $ = skuid.$;


var opp = skuid.model.getModel(“Opportunity”).getFirstRow();

var o = new sforce.SObject(“Opportunity”);

o.Id = opp.Id;


var contactId = sforce.connection.query(“SELECT ID FROM Contact WHERE Name LIKE '%” + opp.Installer_Salesperson_Text__c + “%’ AND AccountId  = '” + opp.AccountId + “'”);


if (contactId.getArray(“records”)n0] === null || contactId.getArray(“records”)|0] === ‘’ || contactId.getArray(“records”)0] === undefined) { 

    alert(‘We were not able to find a contact record for the Salesperson contact on this opportunity. To login as user, please go to their contact page.’);

} else {

    var result = sforce.apex.execute(‘GhostingUtil’,‘login’,{partnerConId:contactId.getArray(“records”)l0].Id});

    if (result.includes(‘ERROR: ‘)) {

        alert(result);

    } else {

        window.open(result,’_blank’);

    }

}


Reply