Protecting fields used in integrations from deletion
h/t to a number of folks on this one, esp Luke Cushanick who shared the idea for this.
Marking fields used in integrations in some way, to prevent them from being deleted, might be useful. Even more useful might be to document which integrations use them, and how.
After some discussion, this can be done using a custom metadata type fairly easily. No code!
Create custom metadata type, lets name it “Integration Field”
Then add 2 fields to the metadata type to track where this is used
Integration name : type = text
Description : type = text area
Now and the magic : create two metadata relationship fields, in order
Object Name : type = metadata relationship, related to entity definition
Field Name : type = metadata relationship, related to field definition
notes:
- the ‘field name’ option will only appear after you create the first relationship field to entity definition
- when...