The curious case of a stray ID

Andrew Hunter on

Share with

LinkedIn
Twitter

One of our goals at Gearset is to turn Salesforce deployments into a single-click process, or as close as we can get to that! To this end, we check every deployment for potential problems before sending it to Salesforce and offer fixes for anything that could cause your deployment to fail. The most common is detecting missing dependencies but we also fix up issues with Master-Detail fields, history tracking, profile-mismatches and many other common problems. Our problem analyzer blog post provides more detail about the issues we can automatically check for.

We’ve just added a fix for a problem that a user reported to us and it was so strange I decided to write it up so that it may help somebody in the future that comes across this problem.

When adding a new phone number field to an object in Salesforce, it will automatically include it in the ‘Lookup Phone Dialogs’ search layout. This normally doesn’t cause a problem, but when this is done to certain standard objects - like Account - it can cause the metadata for that object to reference the new fields internal ID (an odd looking number like 00N2400000IIW2i) rather than its name. This breaks the metadata and most deployment tools, including the Force.com Migration Tool (Ant), would fail to deploy these objects. Gearset has a deep understanding of Salesforce metadata and can fix this problem automatically, ensuring that the deployment can go ahead without a hitch.

Gearset fixing the issue with lookupPhoneDialogsAdditionalFields

If you find that your organization’s metadata has become corrupted in this way then Gearset will warn you and skip that search layout so the rest of your deployment succeeds. For a more permanent fix to this issue, simply edit the search layouts of the afflicted object in Salesforce and add and remove the field causing the issue. When Salesforce saves the layout it will replace the broken entry in the metadata with a new entry that can be properly deployed.

To benefit from this and all the other features of Gearset that come together to give you and your team ingeniously simple deployments, try our free 30-day trial

Ready to get started with Gearset?