12 Replies · Latest reply on Nov 30, 2017 12:44 PM by Corey Johansen

    Client script code to hide ui action



      I want to hide a ui action (link) using an onLoad client script if the user has no role..and the following is my code.


      M@y ui link name is "Show Workflow" and the table is sc_req_item


      function onLoad() {

        //Type appropriate comment here, and begin script below


        var yesRole = g_user.hasRoles();

        if (yesRole){}


        var items = $$('BUTTON').each(function(item){

        if(item.innerHTML.indexOf('Show Workflow') > -1){