Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

We have a requirement where we use External IDs in Salesforce Custom Object.
Ideally, we wanted to make this External ID field to be :

1. Read Only.
2. Required.

But i don't see why Salesforce does not allow us to do this. Salesforce allows us to do only one thing at a time.

Based on my Understanding, If We have a required field in Object, It needs to be added in the Page Layout. When we try to make it as ReadOnly field, Salesforce does not allow us to do. But we don't want the users to edit the External IDs. This seems to be a huge Problem for us.

Why do i think this Requirement/Use Case Valid? :
New Records are created by Integration APIs. So once created ,with Unique external ID, we don't want the users to edit External IDs.

Other than Validation Rule, Is there any other solution any one could think of? Our Client does not accept Validation Rule as a Solution.

share|improve this question
add comment

1 Answer 1

up vote 5 down vote accepted

If integration APIs are creating the record with its unique external ID, the field does not need to be required. Just make it read-only in the layout.

If you are concerned that users may create these records manually, set up the permissions so that only the integration API process (and maybe admins) have permission to create this object type.

share|improve this answer
    
Thank you Jagular!. This solution should work for us. –  Jag Jun 12 at 18:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.