- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 03:57 AM - edited 06-04-2024 04:16 AM
Hi, Community.
We have a requirement where Company A has different help text from Company B on a Record Producer variable/field.
Can anyone assist how we can translate it? Since we want to make a dynamic helptext based on Company, can you please share your insights how we can translate it on this onChange client script?
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue === '') {
return;
}
if (newValue === 'no') {
var companyAjax = new GlideAjax('Client Callable SI);
companyAjax.addParam('sysparm_name', 'Retrieve company SI function');
companyAjax.addParam('sysparm_user', g_user.userID);
companyAjax.getXMLAnswer(function(answer) {
if (answer) {
var answerCompany = JSON.parse(answer);
var crossBrand = g_form.getField("is_cross_brand_position");
crossBrand.expand_help = false;
if (answerCompany.displayValue === 'Company A') {
crossBrand.instructions = "Is the position a cross brand position";
} else {
crossBrand.instructions = "Is the position a cross brand position (work location different than payroll country / contract country)";
}
crossBrand.help_tag = "More information";
var newCostCenter = g_form.getField("new_cost_center");
newCostCenter.expand_help = false;
if (answerCompany.displayValue === 'Company A') {
newCostCenter.instructions = "Provide the HR cost center of the associate.";
} else {
newCostCenter.instructions = "<p>Please: <br>* Provide the HR cost center of the associate starting with 140. <br>* Consult finance / business control if necessary.</p>";
}
}
});
}
}
Since this is manually inputted help text, sys_translated_text record for translating help text is not working.
Thanks in advance!
Solved! Go to Solution.
- Labels:
-
Request Management
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 04:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 04:21 AM
Moved to developer forum - https://www.servicenow.com/community/developer-forum/translating-manually-inputted-help-text/m-p/295...