- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2025 05:58 PM
Hello Community,
I need help configuring the dictionary entry for the 'caller_phone_number' field on the IMS record.
Please review the information below and let me know if you have any questions.
I want to set the field's default value to "North America."
I have tried two different approaches, but with no luck:
1. Typing the Default Value field to North America
2. Changing the Attributes field to "phone_number_default_region=US"
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2025 06:33 PM
I was able to make it work using a Client Script (onLoad).
I made a video with some additional context that you can click the link below:
https://youtu.be/hOb1dx20qtw
Steps to reproduce:
- Show the "Caller Phone Number" field on the following form views:
- Default
- Service Operations Workspace
- Service Operations Workspace New Record
- Navigate to All > System Definition > Client Scripts
- Click the "New" button on the top right
- Enter the following in the fields on the new record:
- Name: Set Default Phone Region to [InsertRegion]
- Table: Interaction [interaction]
- UI Type: All - Unless you want only Desktop or only Mobile
- Type: onLoad
- Active: True ☑️
- Global: True ☑️
- Description:
Sets the default value of the Caller Phone Number field (+1) for new Interaction records to simulate a North America default region for E.164 phone format.
- Script:
function onLoad() {
if (g_form.isNewRecord()) {
var currentValue = g_form.getValue('caller_phone_number');
if (!currentValue) {
// Set default country code to +1 for North America (US).
// Replace "+1" with your region's country code if different.
g_form.setValue('caller_phone_number', '+1');
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2025 06:33 PM
I was able to make it work using a Client Script (onLoad).
I made a video with some additional context that you can click the link below:
https://youtu.be/hOb1dx20qtw
Steps to reproduce:
- Show the "Caller Phone Number" field on the following form views:
- Default
- Service Operations Workspace
- Service Operations Workspace New Record
- Navigate to All > System Definition > Client Scripts
- Click the "New" button on the top right
- Enter the following in the fields on the new record:
- Name: Set Default Phone Region to [InsertRegion]
- Table: Interaction [interaction]
- UI Type: All - Unless you want only Desktop or only Mobile
- Type: onLoad
- Active: True ☑️
- Global: True ☑️
- Description:
Sets the default value of the Caller Phone Number field (+1) for new Interaction records to simulate a North America default region for E.164 phone format.
- Script:
function onLoad() {
if (g_form.isNewRecord()) {
var currentValue = g_form.getValue('caller_phone_number');
if (!currentValue) {
// Set default country code to +1 for North America (US).
// Replace "+1" with your region's country code if different.
g_form.setValue('caller_phone_number', '+1');
}
}
}