Modify run script button

gauravagarw
Tera Expert

Hello, i want to modify the functionality of background script i want to modify the run script button but i don't know where to find that 

1 ACCEPTED SOLUTION

Chaitanya ILCR
Kilo Patron

Hi @gauravagarw ,

I don't think the button is available for configuration

I have tried something 
you can create a global UI script with something below
and select the element and add events to the elements something like click in this scenario

ChaitanyaILCR_0-1744282351845.png

script I used

window.addEventListener('load', function() {
    if (window.location.href.includes('sys.scripts.modern.do')) {
        $('MANDATORY').style.backgroundColor = 'red';
		$('MANDATORY').addEventListener('click',()=>g_form.addErrorMessage('hello'))
    }
});

 

result

 

ChaitanyaILCR_1-1744282471184.png

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

 

 

View solution in original post

5 REPLIES 5

Thank you that's exactly what i was looking for.