Skip to content
Create simple scripts to interact with Dynamics CRM using Node.js
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
docs
src
test
typings
.gitattributes
.gitignore
.npmignore
.travis.yml
appveyor.yml
changelog.md
index.ts
jsdoc.json
licence.md
package.json
readme.md
tsconfig.json
tsexamples.ts

readme.md

Windows Build Coveralls npm npm downloads dependencies ghit.me Package Quality

Project description

DynamicsNode is a library built on node.js that allows you to quickly create scripts to interact with Microsoft Dynamics CRM using JavaScript.

The main goal of DynamicsNode is to make you very productive when it comes to automate small tasks in Dynamics CRM. Just create a .js file, add a few lines and execute it.

No more .net console applications with all the boilerplate code just for creating one record. Go productive!

Github project: https://github.com/crisfervil/DynamicsNode

Review the changelog to see the latest changes.

If you want to receive notifications about new releases, you can star this project in GitHub and use https://sibbell.com

How to use it

Create a new directory to store your scripts and cd into it

$ mkdir MyScripts && cd MyScripts

Install DynamicsNode

$  npm install dynamicsnode

Writing code

Create a new js file named myscript.js and start adding code

var dn = require("dynamicsnode");

// update this with your CRM url and credentials if needed
var crm = new dn.CRMClient("Url=http://crm.contoso.com/xrmContoso"); 

// retrieve current user information
var who = crm.whoAmI();
var myUserInfo = crm.retrieve("systemuser",who.UserId);
console.log(myUserInfo.fullname); // prints your user name

// retrieve a user named John Doe
var anotherUser = crm.retrieve("systemuser",{fullname:"John Doe"});
console.log(anotherUser); // prints all the attributes of the user

Save the file and run the script.

In order to run the script use node

$ node myscript

Further information: API

How to compile and test the code: Compile and Testing

Use it as a command line tool: Commands and Repl

Requirements

Requires Node.js

This tool is based on Edge and requires .NET Framework 4.5 to be installed.

It has been tested in Windows environments only, but could potentially work in Linux too using Mono.

Supported CRM versions

Tested on CRM 2011, 2013 and CRM Online so far.

Volunteers to run the integration tests on other versions are more than welcome :)

Backlog

(Ordered by priority)

  • Get 85%+ code coverage
  • Refactor to minimize .net code
  • Add paging support in queries
  • Add async support
  • Improve Exception handling and Show errors thrown in the CRM side
  • Add support for .net core
  • Make it work in Mono and Linux
  • Add functions to work with solutions
  • Add an Assert object to allow create integration tests
  • Add examples page
  • Add a commands to work with connections
  • Add more commands to repl mode
  • Add support for missing operators in condition objects
  • Add d.ts file to Typings repository
  • Add functions to create performance tests
  • Add functions to allow Continuos Integration tools
  • Add extensibility
  • Add integration tests for activities
  • Improve documentation
  • Add DataTable functions
  • Improve testeability and integration tests
  • Add import/export commands
  • Add test coverage reports
  • Upload npm package
You can’t perform that action at this time.