Override - Run Process Button

Hey,

I've been searching, but I can't seem to find the function I want to override, it's the function that creates the "Run Process" button on the section page.

 

I want to disable it to users who aren't the Supervisor.

I've done something similar with the getViewOptions function so that only the Supervisor could change the column layout of the different sections.

 

Any help in finding the function I need to override would be appreciated!

 

Thanks in advance! 😁

Like 0

Like

2 comments
Best reply

Hi Edo,

I've not tested this yet, but wanted to mention for you to try. That button does have an attribute that controls its visibility. The attribute is "IsProcessButtonVisible". The attribute, and populating of the menu items is done in the mixin "ProcessEntryPointUtilities". You can override the function "fillRunProcessButtonMenu" on BasePageV2 (or which ever specific page you want to do this on). Something like this: 

fillRunProcessButtonMenu: function() {
    if (UserIsSupervisor) {
        // call base function to populate menu and set visible
        this.mixins.ProcessEntryPointUtilities.fillRunProcessButtonMenu.apply(this, arguments);
    }
    else {
        // do nothing except ensure button not visible
        this.set("IsProcessButtonVisible", false);
    }
}

Again, I've not tested that, but I believe it would work.

Ryan

Hi Edo,

I've not tested this yet, but wanted to mention for you to try. That button does have an attribute that controls its visibility. The attribute is "IsProcessButtonVisible". The attribute, and populating of the menu items is done in the mixin "ProcessEntryPointUtilities". You can override the function "fillRunProcessButtonMenu" on BasePageV2 (or which ever specific page you want to do this on). Something like this: 

fillRunProcessButtonMenu: function() {
    if (UserIsSupervisor) {
        // call base function to populate menu and set visible
        this.mixins.ProcessEntryPointUtilities.fillRunProcessButtonMenu.apply(this, arguments);
    }
    else {
        // do nothing except ensure button not visible
        this.set("IsProcessButtonVisible", false);
    }
}

Again, I've not tested that, but I believe it would work.

Ryan

Ryan Farley,

Thank you very much!

This is exactly what I was looking for and is working great 😁

Show all comments