sfdc

fetch sfdc workflow rule information

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         sfdc
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  fetch sfdc workflow rule information
// @author       You
// @require      https://cdn.staticfile.org/jquery/1.12.4/jquery.min.js
// @require      https://cdn.jsdelivr.net/npm/[email protected]/dist/clipboard.min.js
// @match        https://www.tampermonkey.net/index.php?version=4.16.1&ext=iikm&updated=true
// @icon         https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';
    //console.log("console log start")
    //console.log($('.expr').text())
    var data2Col = $('.data2Col')
    var ruleName =  '"' + $(data2Col[data2Col.length-1]).text().trim() + '"'
    //    var ruleName = $('.expr').text() + $('.data2Col').text()
    //for(typeCol in $('.typeCol')){
    //  console.log(typeCol.html())
    //}
    var typeCols = $('.typeCol')
    var typeColVal = [];
    for (let i = 0; i < typeCols.length; i++) {
        //    console.log(typeCols[i]);
        typeColVal.push($(typeCols[i]).text())
    }
    //    typeColVal = []
    //  console.log(typeColVal);

    var descCols = $('.descCol')
    var descColVal = [];
    for (let i = 0; i < descCols.length; i++) {
        //  console.log(descCols[i]);
        descColVal.push($(descCols[i]).text())
    }
    //    console.log(descColVal);
    var v =   ruleName + '\t"' + typeColVal.join('\n') + '"\t"' + descColVal.join('\n') + '"'
    console.log(v)
    //  if(!$("#ta_")){
    $(".pbHeader").append("<textarea id='ta_' name='ta_' value='test value'/>")
    $(".pbHeader").append('<button class="btn" data-clipboard-target="#ta_">COPY</button>')
    //}
    console.log(v)
    $("#ta_").val(v)
    console.log(ClipboardJS.isSupported())

    //    ClipboardJS.copy(v)
    var clipboard = new ClipboardJS('.btn');

    clipboard.on('success', function (e) {
        console.info('Action:', e.action);
        console.info('Text:', e.text);
        console.info('Trigger:', e.trigger);
    });

    clipboard.on('error', function (e) {
        console.info('Action:', e.action);
        console.info('Text:', e.text);
        console.info('Trigger:', e.trigger);
    });
    new ClipboardJS('.btn');

    //new Clipboard(v);

    //    copyToClipBoard(v)
    //    console.log($('.typeCol').html())
    //    console.log($('.descCol').html())

    //    alert ('start')
    //alert($)
    //alert("end")
    // Your code here...
})();