Though a URL field does not have option for making it unique, but you can achieve it with the help of another Text field. I had similar requirement in my app and these are the steps to do it -
1. Create another Text field on the same object and mark it 'Unique'. Do not show this field to the user on any page layout and keep its label same as the URL field's label. 2. Create a new WF for Field Update. - Evaluation Criteria - created, and every time it’s edited - Formula Evaluates to True - True 3. Create a new action for Field Update and update the new text field created with the value of the URL field.
Now if the URL already exists in any other record the system won't allow the user to save the record and throw an error. Now as we used the same label for the text field therefore user will also understand that the error is for the URL field.
Thanks AR
If you find the reply useful that solved your problem then please mark it as best answer.
There is duplicate Management thing launched by salesforce, there you can search the exisiting data having same URL in the field. It will check and notify user that URL is already existing in other records. To know more about duplicate Management please go through this link http://docs.releasenotes.salesforce.com/he-il/winter15/release-notes/rn_general_dedupe.htm
There are certain limitations to this new feature like -
- It is currently available only for accounts, contacts, and leads. - Other than the usual editing of a record, any edit from other sources like Data Import, Chatter publishing etc will result in blocking of the save for the record rather than showing duplicate records etc.
I guess this feature would prove more useful when we have a set of fields on an object that forms a user key for that object, and should be unique throughout all records. And we wish to check what we need to do if we have duplicates - Allow or Block. Like for example leads. A Sales person might still want to enter a new lead when there already exists a similar lead.
The feature of Duplicate management is available for all the object Custom and Standard, and the feature is also availabke for the specific fields sets as well. Please go through the document of Salesforce I gave in the link. Thanks
Though a URL field does not have option for making it unique, but you can achieve it with the help of another Text field. I had similar requirement in my app and these are the steps to do it -
1. Create another Text field on the same object and mark it 'Unique'. Do not show this field to the user on any page layout and keep its label same as the URL field's label.
2. Create a new WF for Field Update.
- Evaluation Criteria - created, and every time it’s edited
- Formula Evaluates to True - True
3. Create a new action for Field Update and update the new text field created with the value of the URL field.
Now if the URL already exists in any other record the system won't allow the user to save the record and throw an error. Now as we used the same label for the text field therefore user will also understand that the error is for the URL field.
Thanks
AR
If you find the reply useful that solved your problem then please mark it as best answer.
It will check and notify user that URL is already existing in other records.
To know more about duplicate Management please go through this link
http://docs.releasenotes.salesforce.com/he-il/winter15/release-notes/rn_general_dedupe.htm
http://abhithetechknight.blogspot.in/2015/04/duplicate-management-salesforce-spring.html
There are certain limitations to this new feature like -
- It is currently available only for accounts, contacts, and leads.
- Other than the usual editing of a record, any edit from other sources like Data Import, Chatter publishing etc will result in blocking of the save for the record rather than showing duplicate records etc.
I guess this feature would prove more useful when we have a set of fields on an object that forms a user key for that object, and should be unique throughout all records. And we wish to check what we need to do if we have duplicates - Allow or Block. Like for example leads. A Sales person might still want to enter a new lead when there already exists a similar lead.
Thanks
AR
The feature of Duplicate management is available for all the object Custom and Standard, and the feature is also availabke for the specific fields sets as well.
Please go through the document of Salesforce I gave in the link.
Thanks
Check the limitations section -
http://docs.releasenotes.salesforce.com/he-il/winter15/release-notes/rn_sales_dedupe_intro.htm#rn_sales_dedupe_intro
Thanks
AR