Latest information about JSforce, interesting use cases, code snippets, etc.

JSforce 1.9 and Its Change on Multi-Record CRUD Operation

JSforce version 1.9.0 is now released, which includes several enhancements, but the most big one is the enhancement of multi-record CRUD operation.

Even in prior versions you can of course create/retrieve/update/delete multiple records in one call, using SObject#create(records), SObject#retrieve(ids), SObject#update(records), or SObject#destroy(ids). But its internal implementation was a little pity - each of input records were mapped to REST API request and called in parallel. As a result, this CRUD call eagerly consumed API quota, so it was not suitable to use when the num of records exceeds certain amount. The connection option maxRequest parameter (default value is 10) was introduced in order not to make excessive concurrent calls.

Read More

Creating Scratch Org in Salesforce DX from API using JSforce

Now SalesforceDX has finally become "Open Beta". There are many features related to improving the "DX", but the most anticipated feature must be "Scratch Org", which you can create a brand new clean Salesforce organization programatically and instantly. Thanks to this feature you can reduce the possibility of environment-dependent test errors/successes you might have faced when you reused one organization repeatedly.

Read More

How to Use JSforce Web Console

JSforce is useful not only for developing Salesforce application but also for learning Salesforce API itself. JSforce has a "REPL mode" - you can issue an API request and confirm the result interactively from your terminal console. The result can be manipulated in JavaScript, so you can even run a simple script in the REPL.

You know there is a well-known web application to check Salesforce APIs casually - Workbench. This web app does provide interfaces for many APIs of Salesforce, but just for checking the response. It is not connected to the execution of scripts.

Read More

JSforce 1.5 and Its Features

JSforce version 1.5 has been released which includes several important updates. The release of 1.5 had been planned to be just after the release of Summer '15, but delayed almost 2 months because I couldn't share the time to check all issues related to the release. Sorry for the delay to everyone who longly anticipated.


The table of release contents is here, but I'd like to pick up some features which become available in 1.5.

Read More