Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

How to ensure that the mobile field must contain a unique value?

Asked by Dipika Agarwal May 27, 2024 4.2K views 4 answers
Share

About this question

i want to make phone field unique for this i have tried triggers but i want to write validation rule for this i have written something like

AND( CONTAINS( VLOOKUP( $ObjectType.Student_Information__c.Fields.Phone_no__c, $ObjectType.Student_Information__c.Fields.Phone_no__c, Phone_no__c ), Phone_no__c ), OR( ISNEW(), ISCHANGED(Phone_no__c) ) )

vlookup is not working for phone type field can you please help me with this, Is there any idea that I can make the phone field unique ?

Your answer

4 Answers

Rowanbutler Latest answer

Answered on Jun 1, 2026

To ensure a Mobile field contains a unique value in Salesforce, you can mark the field as Unique in the field settings, which enforces uniqueness at the database level. If more control is needed, you can use validation rules, Flow, or Apex to handle complex uniqueness conditions. This helps prevent duplicate records and maintains data integrity.


https://powerplay-casinocanada.com

Was this helpful?

Whoopigoldberg

Answered on Sep 30, 2024

@gorilla tag Using a unique constraint or unique index, you can make sure that the Mobile field of a SQL Server table only has unique values. With this rule in place, it will be impossible for the Mobile column values in any two rows of the table to be identical. 



Was this helpful?

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.