SchemaPuker v0.2 Released!

Try the new version right now at https://schemapuker.herokuapp.com/ 

I have been getting a lot of feedback about SchemaPuker since its launch, and many, many people have tried it out
The response has been far more than I expected, with many tweets and even a couple of blog posts about the tool;

Lucidchart + SchemaPuker: The Winning Combination for a Salesforce Consultant
Phil’s Salesforce Tip of the Week #220

I am so glad people are finding the tool useful, I’ve had a few feature requests and bug reports, which is why I have now released a new version, with the following changes;

  • You can now select if you want all fields displayed, or only relationship fields
  • Much better error handling!
    • Before, if something went wrong, you’d either get an ugly error page, or nothing at all, now you will get some (hopefully) useful details if something goes wrong
  • Huge speed increase, up to 5.9x faster in my super scientific benchmark*
  • All relationships should now be visible, some users were reporting that the lines connecting them didn’t show in lucidchart
    • I threw my entire dev org at it, and was able to see all the relationship lines automatically, if you are still experiencing this issue please let me know!
  • Minor text fixes

I have had suggestions for more new features, which I do plan to include in future releases, so please keep them coming!

If you have any suggestions, comments, bugs or need help you can send me a tweet, leave a comment, or send me a message!

* Super scientifc benchmark method: timing the old and new method several times and working out the average difference

SchemaPuker: ERDs made easy

SchemaPuker can be accessed here: https://schemapuker.herokuapp.com/

Read on for more information about SchemaPuker!

Often, we need to produce diagrams of our organisation’s data model (aka. ERDs). This will be especially true for those of us who are consultants.

Perhaps you are doing a discovery or analysis and need a a copy of the current data model, or maybe you need a ‘current state’ and a ‘to be’ for comparison, or you are designing new functionality that connects with an existing data model, or documenting functionality after completion.

Now, salesforce does have a tool to visualise the data model, called Schema Builder, however this cannot export the model, nor can it be customised without actually changing the data model itself.

To solve this problem, I came up with… SchemaPuker! (thanks to David Carroll for the name! and to David Everitt for the idea in the first place!) For more about how it came to be, and the name click here

But for now, SchemaPuker is a fairly simple tool, It allows you to authorise to salesforce, get a list of your objects and export them as a PostgreSQL schema file. This file can be imported in to Lucidchart (and other tools) in order to generate an editable ERD.

The tool itself is very simple to use, first, navigate to https://schemapuker.herokuapp.com, choose if you are using a Production/Developer Org or a Sandbox and click ‘Login’. You will then be asked to enter your salesforce credentials and to authorise SchemaPuker to access your org.

Screen Shot 2016-09-01 at 16.36.36

Once authorised, you will be given a list of objects inside your salesforce org. You then select the objects you wish to be in your ERD by holding down command (or crtl on windows/linux) and clicking, or by typing the API names in the ‘Selected Objects’ box

sp2

Once you click submit, you are given the PostgreSQL Schema. You can either copy/paste this into lucid chard, or click the ‘Download’ button below the output.

sp3

Next, log in to Lucidchart and create a new drawing, click ‘More Shapes’ at the bottom and then tick ‘Entity Relationship’ and press ‘Save’

lucid1

Now, you can either import the downloaded file from SchemaPuker by pressing ‘Choose File’, or paste the output in to the box below. You can ignore steps one and two in the import window.

lucid2

You will now see your salesforce objects in the sidebar just under the ‘Entity Relationship’ panel. You can drag the objects on and the relationships between the objects will be automatically created.

lucid3

You can click add new shapes from the ‘Entity Relationship’ panel to extend your ERD as required.

Thats it! Please try it out and let me know how you go!

Please Note: This is still very much beta, and is ‘minimum viable product’. However I am working to improve it on a regular basis, and would love to hear your thoughts.
It is limited to ~30 objects per export and may crash in fun and exciting ways. The app does *not* store any data, nor does it make *any* changes to your salesforce org.

Kittenforce! aka. telling your users when your instance is down for maintenance

The other day, Scott (check out his blog here) and I were at work chatting about the security trailhead superbadge (specifically, my domain). When you have a custom domain for your salesforce instance, you can customise your login page (or replace it entirely).

I then decided that a would make the login page far better, and hence;

After this, I went to login to a sandbox to do some actual work, only to be greeted with the ‘Please check your username and password. If you still can’t log in, contact your Salesforce administrator.’ message.

I was fairly sure I hadn’t forgotten my password, so I tried it again… nope. same thing.

What I had forgotten, was the fact that the daily deployment to that environment was happening, and as such all users except for the DevOps team were frozen out.

Which got me thinking… If I can put kittens on the login page, then why not some useful information too.

So, that evening I built this;

The concept is fairly simple, when you put an environment into ‘Maintenance’ mode (e.g during a deployment, etc) it freezes all users, excluding a defined list (e.g the DevOps team, system admins) and changes the login page to show a message informing the users of this.

When you are finished and disable maintenance mode, it will unfreeze all users and change the login page message back.

It uses a custom object to store a list of users who were frozen before the environment entered maintenance mode to ensure they stay frozen once the environment is changed back to normal mode.

The actual page itself is hosted from a force.com site, and is configured via a custom setting and custom metadata, which includes allowing them to be override by other pages.

If you would like to try this in your org, click here for the unmanaged package

For installation instructions, see this post.

I would love to hear any feedback you have, feel free to comment below.