@hso/d365-cli
HSO D365 Command Line Interface
Last updated 2 days ago by nsteenbeek .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @hso/d365-cli 
SYNC missed versions from official npm registry.

D365-CLI Forms/Webresources project automation

npm npm npm

Introduction

A Command-line interface for D365 Project (Forms/Webresources) Development based on HSO best practices. Invoke the tool on the command line through the hso-d365 executable. Online help is avaliable on the command line. See wiki for detailed CLI Commands.

Since the features and thus the documentation is growing fast, this readme only contains a [Getting Started](#Getting Started). All documentation and examples can be found in the wiki.

Getting Started

Install CLI

  npm install -g @hso/d365-cli

For a more detailed installation and prerequisites see wiki for Installation.

Create project

To create a new, basic D365 Webresource project, go to the parent directory of your new workspace and use the following commands:

  hso-d365 new my-first-project

This will ask a couple of questions to setup the project:

  Initializing D365 Project my-first-project
  D365 environment url (eg. https://yourproject.crm4.dynamics.com):? https://yourproject.crm4.dynamics.com
  D365 Solution name:? CoreEssentials
  D365 Publisher Prefix (3 chars a-z):? hso
  Namespace (eg. Customer or Product name):? mfp
  Installing npm packages. This may take a while...
  Initializing D365 Project done

Add Entity

To add an entity to the project use following commands:

  cd my-first-project
  cd Webresources
  hso-d365 generate Entity MyEntity

This will ask a couple of questions to setup the Entity:

  Adding D365 Entity MyEntity...
  What is the Entity Logical Name? myentity
  Adding D365 Entity done

Add Webresource

To add an Webresource to the project use following commands:

  hso-d365 generate Webresource MyWebresource

Deploy

To build and deploy changes made to the Entity and Webresource use following command:

  npm run build:prod

Now the folder Webresources/dist/mfp_ contains the bundled and uglified files to be deployed. It's recommended to deploy in the same folder structure to D365.

Use following command to deploy

  npm run deploy

Examples

Cloning Quote

private static async clone(executionContext: Xrm.Events.EventContext): Promise<void> {
    const formContext = executionContext.getFormContext(),
        id = formContext.data.entity.getId(),
        quote = await QuoteService.retrieveClone(id),
        quote.name = `Copy - ${quote.name}`,
        validation = await QuoteService.validateRecord(quote);
    if (validation.isValid) {
        try {
            await QuoteService.createRecord(quote);
        } catch (e) {
            console.log(`${e.code} - ${e.message}`);
        }
    }
}

Current Tags

  • 1.7.5                                ...           latest (2 days ago)

26 Versions

  • 1.7.5                                ...           2 days ago
  • 1.7.4                                ...           2 days ago
  • 1.7.3                                ...           8 days ago
  • 1.7.2                                ...           15 days ago
  • 1.7.1                                ...           15 days ago
  • 1.7.0                                ...           a month ago
  • 1.6.1                                ...           a month ago
  • 1.6.0                                ...           a month ago
  • 1.5.3                                ...           2 months ago
  • 1.5.2                                ...           2 months ago
  • 1.5.1                                ...           2 months ago
  • 1.5.0                                ...           2 months ago
  • 1.4.1                                ...           2 months ago
  • 1.4.0                                ...           2 months ago
  • 1.3.1                                ...           3 months ago
  • 1.3.0                                ...           3 months ago
  • 1.2.1                                ...           4 months ago
  • 1.2.0                                ...           4 months ago
  • 1.1.2                                ...           4 months ago
  • 1.1.1                                ...           4 months ago
  • 1.1.0                                ...           4 months ago
  • 1.0.9                                ...           5 months ago
  • 1.0.8                                ...           6 months ago
  • 1.0.7                                ...           6 months ago
  • 1.0.6                                ...           6 months ago
  • 1.0.5                                ...           6 months ago
Downloads
Today 0
This Week 42
This Month 85
Last Day 2
Last Week 11
Last Month 74
Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |