PrashantLearnIT
Giga Sage

Hello Everyone,

In this video, I will cover scenario-based solutions which our implementations might require in various projects.

I have explained how to add Placeholder for certain fields in Change Requests using Client Scripts.

 

 

==========================CLIENT SCRIPTS============================

Table - Change Request
Type - OnLoad
Scripts -

function onLoad() {
//Type appropriate comment here, and begin script below
var short_desc = g_form.getControl('short_description');
var desc = g_form.getControl('description');

short_desc.placeholder = 'Please provide short details about this change.';
desc.placeholder = 'Please provide details in brief, what exactly this change is about.';
}

 

If my video/content helped you in any way, please mark this video/content as BOOKMARK, SUBSCRIBE & HELPFUL

 

Best Regards,

Prashant Kumar (LearnIT)

 

YouTube Channel LearnIT: https://www.youtube.com/@learnitwithprashant

Blog LearnIT: https://medium.com/@LearnITbyPrashant

Prashant Kumar LinkedIn: https://www.linkedin.com/in/learnitbyprashant/

ServiceNow Community Prashant Kumar - https://www.servicenow.com/community/user/viewprofilepage/user-id/19635

2 Comments
Dan Gripping
Tera Expert

How do you get this to work in Workspace?

wmcgrath
Tera Expert

@Dan Gripping I've found that you can use g_form.setFieldPlaceholder('field', 'message') to do this.

e.g.

g_form.setFieldPlaceholder('short_description', 'Enter a short, descriptive title for the change request');