Salesforce Metadata Management (node.js) - Part 2

Introduction

Following this post, I wanted to extend this app with something new. I don't know much people who like deploying metadata on Salesforce most likely because you usually end up with an unexpected problem. You have lots of tools to do that well but no one is really user-friendly and efficient. Force.com Ide is just a pain with all the slow steps, Change Set is sometimes failing for no reason but it's also very smart (I will come back later about this point). Ant Migration Tool is probably the most efficient but the user-friendliness gets a 0 out of 5.

The App

After I was finished with this previous Backup app, I accumulated some experience with Salesforce authentication, and SOAP API in Node.js. Writing this app was therefore less challenging, but I learnt a lot again. I created an interface on which users can select metadata to deploy

Users select also their source and target Salesforce Org and the only thing they have to do is clicking on "Deploy". Current deployment status will be displayed in the side panels.

How it works

User needs to create connections before to the different Orgs. This app shares the same connections created for the backup app. Once authenticated, an OAuth Token is saved in the Heroku App in order to perform authentications to Salesforce. When the user select metadata, a request is sent to the corresponding Salesforce Source and Salesforce answers asynchronously. There is a lazy read function also on the different folders of the tree. Once metadata are selected and the user clicks on Deploy, metadata are pulled from the source, sent to the target (it's a zip file concretely) and finally the app is waiting on the answer of Salesforce. A request is done every few seconds and check whether the deployment is finished or not. Issues are also displayed in case the deployment was unsuccessful. I'm using also the wonderful socket.io to display real-time notification to the user.

Few other things

In top of that, I allowed the user to double-click on any metadata component in order to retrieve the source.

User is offered different possibilities like sending the metadata to the target, updating the source or just selecting the metadata.

Limitations

The app has not much limitations. Of course, you cannot deploy every single metadata with this app, just because Salesforce does not allow it. Lots of setup settings are simply not deployable through the API. Also Change Sets are sometimes really annoying but sometimes also very smart. They offer something that no API tool can reproduce: matching of username between sandboxes belonging to the same Live Org, and that's very cool. Indeed, if you want to deploy an outbound Message with the Force.com IDE, this app or the Migration Tool, you will get an error that the current running user does not exist. Salesforce Change Set makes the match for you.

Again, you can play around with this app located at this address.

comments powered by Disqus