Oh, i get to type that apex url syntax into this query another time, lucky me!”, said no sane person, ever.

Ok, well maybe this sounds more familiar. “This piece of code is so well written, it will never error out, so I can skip the exception handler“. Aaaah, that’s more like it, right?

What if I told you there was a great tool that makes typing in that apex url syntax (and what about the prepare url bit??) a breeze. A tool that means you’ll never want to skip the exception handling again. Or maybe you still will, but only because your code is really THAT good, right?

My dear friends in the APEX community, meet TextExpander. Or maybe you’ve already met, but you haven’t moved out of the friend zone yet. Please read on, and I guarantee you will be getting all the feels very soon.

Boring things we all must do

bored julia louis dreyfus GIF

As APEX developers, there are some basic rules we must live by in order to deliver solid and secure applications. And most of them  involve a fair amount of pretty repetitive typing. 

  • We keep our business logic in the database, right? That means we’re creating a lot of packages, procedures and functions. Most of these share at least some basics that we’re just typing over and over again
  • We have exception handlers and log errors, right? (yes, I see you hanging your head at the back)
  • We have to get familiar with that APEX URL syntax (after all this time, I still find myself Googling that one… I know it’s easier in the latest version, but some of us still have clients on 4.2…)

Not to mention that same query you’re still typing in time and time again, checking in on those users that swear they did thing 1 when you know they did thing 2 ..

We still have to do them, let’s just do them FASTER

I could give you my very own step by step instructions for this amazing tool, but I’m all about saving time, remember? So I will simply dare you to watch this 4 minute video and not come away bubbling with excitement at the thought of all the ways you could use it.

Did you watch it?? Don’t you love it??

Some I made earlier

TextExpander is always watching for those shortcuts, whether you’re working in SQL*Developer, your email app, Word, Text editor, or your browser. No configuration needed.

Consider some of the fill-in snippets I have created for myself and imagine what you could do yourselves.

  • When creating a new table, a snippet prompts me for table name, PK name, and auto generates most of the create table statement, along with my usual auditing fields (created_by, created_on, updated_up, updated_on). The same snippet expands to create the related sequence and trigger. I can almost hear you oooohing and aaaahing from here. Yes, I agree, it is a thing of beauty. Notice all I type in is my short code, ‘,table’, I get prompted for 2 fields, and that whole code gets auto generated.


  • Of COURSE I have one for the APEX URL syntax. Typing in ‘ap_url’ automatically expands to give me that beautiful beast. I set it up to prompt me for the page number. I then use nested snippets to embed that in my prep_url snippet, which gives me the full APEX_UTIL.PREPARE_URL syntax.
  • As mentioned above, I have a snippet for my custom error handling procedure.
  • Since most of my development involves some sort of email workflow, I have a snippet for the APEX_MAIL.SEND procedure. I use the ‘Optional’ feature of TextExpander for a piece of code that adds attachments.

ezgif.com-optimize (1)

I have really only just started setting up, and have been adding snippets daily. It’s so easy to do, and has already saved me from typing 7,245 words. Yes, I’ve counted them. Now that I have all this extra time, I can do that sort of thing, and you can do the same, since I am assuming you’ve already installed this baby.

So please feel free to go watch some dog videos on YouTube. Or cat videos, if you really must. Because, you know, #extratime. You’re welcome.