Thursday, December 12, 2019

Deploying Page Layout: unknown duplicates value on record with id: 0Jo3J0000000ZTL

It probably doesn't get more cryptic as error messages from Salesforce go.

Let me back up.  Here's what happened.  I did some manual diff and merge for page layouts before committing them to Git (the wise among you may already start shaking heads).  When I tried to deploy the merged layout to validate, that's the error I got.

The error doesn't look that unfamiliar, but what I remembered would usually be related to some code or data load that tries to insert/update records.  What does "duplicates value" (needs grammar check here btw) have to do with page layout deployment?

The key to resolution here is with the Id, it turned out.  Thanks to useful resource like this handy list of standard Id prefixes, I learned 0Jo is for PlatformActionItem, which is an element in Layout metadata.  After looking through the whole list (), I noticed there's 2 entries for the standard button Delete (with different sort order) - that's what the "duplicates value" complaint is about!  
 

I guess that must be the result of an incorrect decision on merging diff sections.  Once that's squared away all is well.

Never a dull day working with Metadata API...


No comments:

Post a Comment