How to make country code required

Step-by-Step Guide

Create and activate a sandbox

Navigate to Person Management

Search for a person and select the person record in the search results and then the Actions > Personal and Employment > Manage Person

 

 Select "Customize Pages" from the user menu at the Site level and set the View to Source

 Click on the Edit button for the Communication Accounts and Click on ‘Edit’.

 

Scroll down to the third ‘popup’ and select it and edit it.

 

For the Child Creation property, set it to ‘Immediate’ and click on Apply and OK.

 

Expand the ‘panelGroupLayout: default’ and then select the ‘Edit Component

 

 

 

Select the Country Code ‘inputComboboxListOfValues’ and select Edit. For the ‘Required’ property, select the ‘Expression Builder’

 

 



 

Enter ‘true’ in the expression field and click on OK.

 

 

In order to see the changes, switch to Design mode, and select the Edit > Phone Details.

Observe that if the user enters a new phone record without a country code and clicks on OK, the user will get an error message.

 

 

Close the page composer and thoroughly test the personalization.

 

 

I hope this blog post was helpful for you. If you have any questions or feedback, please leave a comment below.

Global Human Resource
Posted by : Mohammad