- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2021 09:32 AM
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.
Solved! Go to Solution.
- Labels:
-
Incident Management
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2021 10:05 AM
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;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2021 09:43 AM
Have you set your script to run on the portal/mobile and not desktop?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2021 09:57 AM
Hi Joro,
I selected Ui Type as "All".
Still facing the issue.
Thank you,
Balaram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2021 09:46 AM
getControl in not supported on portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2021 10:00 AM
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.