using Getcontrol

keerthana
Tera Contributor

 get control- on incident form change the color incident number text in blue when form load

2 ACCEPTED SOLUTIONS

Karthiga S
Kilo Sage

Hi @keerthana 

 

Below is the Client script

function onLoad() {
//Get the incident number element
var incNumElement = g_form.getControl('number');
if(incNumElement) {
//Change the color to blue
incNumElement.style.color = 'blue';
}
}

Please mark it Correct and Hit Like if you find this helpful!

 

Regards,

Karthiga

View solution in original post

Samaksh Wani
Giga Sage
Giga Sage

Hello @keerthana 

 

 

function onLoad() {
    //Type appropriate comment here, and begin script below
    var element = g_form.getElement('number');
    if (element == True) {
        element.style.color = "blue";
    }
}

 

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful.

 

Regards,

Samaksh

View solution in original post

3 REPLIES 3

Karthiga S
Kilo Sage

Hi @keerthana 

 

Below is the Client script

function onLoad() {
//Get the incident number element
var incNumElement = g_form.getControl('number');
if(incNumElement) {
//Change the color to blue
incNumElement.style.color = 'blue';
}
}

Please mark it Correct and Hit Like if you find this helpful!

 

Regards,

Karthiga

Samaksh Wani
Giga Sage
Giga Sage

Hello @keerthana 

 

 

function onLoad() {
    //Type appropriate comment here, and begin script below
    var element = g_form.getElement('number');
    if (element == True) {
        element.style.color = "blue";
    }
}

 

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful.

 

Regards,

Samaksh

Samaksh Wani
Giga Sage
Giga Sage

Hello @keerthana 

 

As per new community rules, you can accept multiple solution as Accept.

 

Plz Mark my Solution as Accept if you got help from it.

 

Regards,

Samaksh