[SalesForce] Null or Empty value are allowed in Unique and External ID text field

I have created a text field in a custom object, and checked the option for External ID and Unique only but not the Required option.

i want know if this text field will allow a NULL or Empty value ? Can anybody clear my doubts.

Thanks

Best Answer

Yes, those fields can have a NULL value but wont serve the purpose.

External ID: This is a field that usually references an ID from another (external) system. For instance, if the customer has an Oracle Financials system that they will be linking with salesforce.com, it may be easier for them to be able to refer to the Oracle ID of account records from within salesforce. So they would create an external ID in salesforce.com and they would load the Oracle ID into that field for each account. They can then refer to that ID field, rather than the salesforce.com id.

Additionally, if you have an external ID field, the field becomes searchable in the sidebar search. You also can use the upsert API call with the extenal ID to refer to records.

You can have multiple records with the same external ID (though it is not reccomended, as it will defeat the purpose of the external id)

Unique ID field

This is a setting for the field that will prevent you from using the same value in multiple records for the unique field. So if I create a 5 character text field and make it unique, and I create a record with the value "12345" I will not be able to create another record with that same value in the unique field. If I try to do so, I will get an error saying that the value is already in use.

Often, External Ids are set with the unique property so that the IDs will be unique to each record.

Please refer to : https://help.salesforce.com/HTViewHelpDoc?id=custom_field_attributes.htm&language=en_US

Related Topic