About me

I am here to help! Contact Me

I am here to help Salesforce Developers in whatever way I Can .Send me an email and I will reply to your concern ASAP!.

I am available for freelancing, Drop me email for opportunities !


WorldofSalesforce.com
Mobile: +91-xxxxxxxxxx
Email : info@worldofSalesforce.com


1 comments:

  1. Hello Saurabh,
    {!REQUIRESCRIPT("/xdomain/xdomain.js")}
    {!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")}
    {!REQUIRESCRIPT("/support/console/36.0/integration.js")}
    {!REQUIRESCRIPT("/soap/ajax/33.0/apex.js")}

    var url = '/apex/MeasureSelection?id={!Case.Id}';

    var caseId = '{!Case.Id}';

    var queryCaseOwnerId = 'SELECT Id, OwnerId'
    + ' FROM Case'
    + ' WHERE Id = \'' + caseId + '\'';

    var currentCase = sforce.connection.query(queryCaseOwnerId);
    var caseOwnerId = currentCase.records.OwnerId;

    if(caseOwnerId.includes('00G')) {
    alert('De case-eigenaar is nu een wachtrij.\nZet de case op jouw naam om een maatregel te kunnen maken.');
    } else {

    if(sforce.console.isInConsole()) {
    //First find the ID of the current primary tab to close it
    sforce.console.getEnclosingPrimaryTabId(function(result){
    var tabId = result.id;
    var subTabTitle = '{!$Label.Measure_Selection_Title}';
    sforce.console.openSubtab(tabId, url, true, subTabTitle, null);
    });
    } else {
    location.replace(url);
    }

    }


    can we convert this javaScript button to lightning component

    ReplyDelete

Powered by Blogger.