Searching For Code

We’ve all been there before, there’s a random message being displayed, or some event triggered, or value being returned, but we have zero idea where it’s coming from.

You search relevant business rules and script includes and it’s just a real struggle. Just yesterday I helped with an issue with a web service returning random comments and we had no idea why (turns out someone set a default value in the dictionary entry!).

But finding it wasn’t that difficult with this one simple trick.

Just go to the sys_metadata table and do a keywords search (“for text” search in the little dropdown at the top) for one of the words you’re seeing and see which application files it crops up in. 90% of the time you’ll find it in there and it’s super quick.

What is this table? Well, all core configuration tables that are captured in update sets extend this table. It was introduced in Fuji if I remember correctly. So it’s the parent table for business rules, script includes, client scripts, ui actions etc.

It’s all indexed so doing a text query search, you can find pretty much anything in there almost instantaneously.

Obviously if this message comes from some other custom table that’s not caught in update sets, that’s a different issue and I’m sorry, you’re still going to have to do the digging to find it, but this will have you covered for the vast majority of cases.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.