Client script is not working on my Instance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-22-2024 11:21 PM - edited ā04-22-2024 11:26 PM
Hello
On my instance any type of client script is not working. My story is stuck from two days because of this issue.
What could be reason and solution for this to resolved.
Your help will be alot for me
Thanks & Regards,
Aakanksha Lavande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-22-2024 11:29 PM
Hi @aakankshapl
If there is any client script in your instance scripted wrongly, it will stop all the client scripts. You need to check since when you're experiencing it and identity any client script which was updated recently.
Regards,
Amit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-22-2024 11:41 PM
All other client script are the OOB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-23-2024 12:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-23-2024 01:52 AM
I need to add a new custom field to the Account form to facilitate the tracking and validation of email domains that are trusted by each client.
This field, named "Trusted Email Domain(s)" (u_trusted_email_domains), will be a string field where users can input email domains that are considered secure and reliable for communications related to the account.
Domains must be entered with an "@" sign at the beginning, and multiple domains should be separated by a comma.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '' ) {
return;
}
var trustedDomains = g_form.getValue('u_trusted_email_domain_s');
alert(trustedDomains);
var domainArray = trustedDomains.split(', ');
for (var i = 0; i < domainArray.length; i++) {
if (!domainArray[i].startsWith('@')) {
g_form.addErrorMessage('Each domain must start with "@"');
return false;
}
}
return true;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-23-2024 03:05 AM
Hi @aakankshapl
Can you try the following onChange client script-
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '' ) {
return;
}
var trustedDomains = g_form.getValue('u_trusted_email_domains');
var domainArray = trustedDomains.split(',');
for (var i = 0; i < domainArray.length; i++) {
var domain = domainArray[i].trim(); // Trim to remove extra spaces
if (!domain.startsWith('@')) {
g_form.addErrorMessage('Each domain must start with "@"');
g_form.clearValue('u_trusted_email_domains'); // Clear the field
return false;
}
}
return true;
}
Regards,
Amit