Friday 16 November 2018

Can't find your object fields in Lightning?

Can't find your Fields in the Object Manager search using Lightning Experience?

Then, this is the blog post you are looking for.

What's the problem?

The problem is that, as of November 2018, the search functionality for the Object Manager in Lightning Experience only provides searches by the Label of the objects and the Label of the field.

How did I find out?

I found out about this problem a couple of weeks ago, when I was working in a project where the API Field names don't quite follow the best practices and they are very different to the Field Labels...

I'm a developer, so I'm sometimes a victim of copy-paste typos and hard-coded field names, where miss-spellings happen all the time... So I was getting compilation errors due to 'non-existing' fields in the object...

So, as I've mentioned before on this blog, I consider myself an 'Admineloper', as I do a lot of point and click combined with coding on my daily job. There I go with my #AwesomeAdmin super powers to find out what's going on...


And I spent a good couple of hours double checking that I wasn't going mad... Honestly, I started thinking I found the glitch in Salesforce that nobody had ever found before!! hahaha

Then I called for help, and my colleague Tom Blockley shared his fresh pair of eyes to confirm I wasn't going crazy, and suggesting to search by the label name, instead of the API name.

Show me with a few screenshots!

And that was the key!! I hadn't thought for a single second that searching by the API name wasn't a feature of the Object Manager search...

I thought this wasn't a big deal, since I was working with a custom object that was very specific to that org, but then I found a few examples where this also happens with standard objects.

Let's see a few examples with the D&B Company object: this is the label of the object, but its API name is DandBCompany.


If we are developing and we know the API name, it would make sense to use the term 'dandb' as the Quick Find search input. Well, this is what we get when we do that:


Note that no results are returned...

Now, this is what you get when your search term is 'D&B', which is part of the Object Label:


The same thing happens with the field names, when you search by substrings of the API name, no results are returned if the Field Label doesn't contain that substring...

Another example of field search in the same object, D&B Company:


If we are programmatically manipulating this field on this object and we know its API name is SalesTurnoverGrowthRate, but we don't know some of its details, for example, its length, then it makes sense to go to the Object Manager and look for that field to check the information we are after. This is what we get if we search by 'Turnover':


Note that no results are returned... That substring is part of the API name, but is not part of the Label, and therefore it doesn't show in the result list.

However, if you search by 'revenue', which is a substring of the Label, but not contained in the API name, the result is as follows:


Also note that the search is not case sensitive, as the search term used is 'revenue', all lower case, and the Label contains the substring 'Revenue', with a capital R.

Success Idea

There's already a Success Idea for this: this link. I've upvoted it as I think this is an important feature that Lightning Experience is missing, not only to search by API name, but also by Description... So if you also think this is an important feature, please follow the link and upvote for this idea.

Looking for a field that you know the name of is great to get information about its properties, but when you don't have much information about it, it becomes quite difficult if you can only search by the field label...


No comments:

Post a Comment