In the last post I showed how you can upload a custom theme to the instance repository so that all your developers can choose that theme within the create application wizard. And more importantly, subscribe that theme from the theme repository.
Now the next question is how to update that public theme so that all applications can inherit the changes.
My first attempt was to simply go to Instance Administration – Manage Instance – Public Themes and look for an update button. But that one doesn’t exist. Re-creating the public theme creates a copy and thus you can’t update your apps with those changes.
It seems to me that someone forgot to implement that crucial functionality.
That actually didn’t stop me, on the contrary it tempted me even more to find a (legal) solution.
So let’s look at the public theme listing. Especially that column “Workspace 11 Application” caught my interest.
Is there even a Workspace with ID 11? Absolutely, and it’s name suggests it *is* the instance repository.
And it also contains an app with the ID mentioned in the public theme.
Well then let’s create a user for that workspace and log on to update that app. Unfortunately this isn’t possible, because that workspace can’t be selected in the create user dialog.
Too bad, but we can solve that: we create a workspace user through the APEX import API.
And there it is, so let’s give that user a new password.
And log on to the repository workspace.
I need to warn you at this point, that you probably shouldn’t be doing this. Since we couldn’t create a user for that workspace the legal way, this probably means we are not supposed to log on to that workspace. There is a good chance we could break something, right?
Anyway, I’m just showing you what to expect, so that you don’t have to do it ;-)
There is our application, it’s completely empty except for the theme and templates. Now we can edit the templates and the theme to our liking.
After we are done with template changes let’s log out of that workspace and never come back. Instead log on to an application workspace and go to one of the applications which uses our public theme. Navigate to Shared Components -> Themes and open the theme.
Now hit the verify button, where you’ll see the changed templates. All you need to do now is click refresh and you are done.
Alright, that’s all. Please don’t break anything and lets all hope that APEX will provide better support for custom public themes in the future.