Skuid Javascript snippet buttons not working in summer '18

edited September 4, 2019 in Questions
Skuid on Salesforce

Comments

  • edited December 27, 2018
    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.image".  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?

  • Eugene RinehartEugene Rinehart ✭✭✭
    edited December 27, 2018
    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")[0] === 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")[0].Id});
        if (result.includes('ERROR: ')) {
            alert(result);
        } else {
            window.open(result,'_blank');
        }
    }
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!