Can we mark a field as External Id in a patch org?
I need this so that the field will be indexed.
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityI assume you can't as that would violate the key principle of "while ensuring that subscribers experience no visible changes to the package" that also ensures a patch org can be upgraded to the next non-patch version.
Looking in a patch org to confirm, for a custom object field I see the option disabled:
External ID - Set this field as the unique record identifier from an external system
So you can't.
PS
In fact the restriction is broader than patch orgs: Allow edit of ExternalId for Managed-Deployed custom fields.