How to make label variable type to look bold in service portal?

Balaram7
Kilo Sage

Hi all,

 

we got a requirement to make label variable type as bold in service portal for a catalog item variable.

I tried this by using a catalog client script. It is working fine in native view. If i open that catalog item request form in service portal, it is showing javascript console error. 

Please help me with the best possible to achieve this.

 

Below is the onload client script i used, its working for Native view but not in Service portal.

 

function onload(){

g_form.getControl('variable_name').setAttributes('style', font weight : bold);

}

  

 

 

Thank you,

Balaram.

1 ACCEPTED SOLUTION

1. Navigate to Service Portal --> Pages

2. Open Page with ID as sc_cat_item

3. In page specific CSS write below. In below example, the backend variable name of my variable is hard_drive

#hard_drive > div > label

{
font-weight:bold;

}

General

#nameofvariable > div > label

{
font-weight:bold;
}

View solution in original post

12 REPLIES 12

Community Alums
Not applicable

Have you set your script to run on the portal/mobile and not desktop?

Hi Joro, 

 

I selected Ui Type as "All".

Still facing the issue.

 

 

Thank you,

Balaram

Pranesh072
Mega Sage
Mega Sage

getControl in not supported on portal 

Hi Pranesh,

Thanks for your response.

Please help me the best way other than "getControl" , to make label type variable as bold in Service portal as well.

 

 

Thank you,

Balaram.