Skip to content

The all-in-one tool to develop code for Dataverse/Dynamics 365. Helps you connect to a Dataverse environment, generate TypeScript definitions for entities, create a different type of Dataverse-specific projects, and much more.

License

Notifications You must be signed in to change notification settings

Power-Maverick/DataverseDevTools-VSCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Dataverse DevTools

The all-in-one tool to develop code for Dataverse/Dynamics 365!

This repo is an open-source project that provides a code for a Dataverse DevTools VS Code Extension that helps you connect to a Dataverse environment, generate TypeScript definitions for entities, create different type of Dataverse-specific projects, upload web-resources right from VS Code and much more.

Do check-out the planned features list. We need your help to complete these planned features.

Table of contents

โš™ Features

Connect to your Dataverse environment

There are 3 ways you can connect to your Dataverse Environment.

Connection Type Description
Microsoft Login Prompt (Recommended) Uses Microsoft Dev App Id. This connection will work with MFA-enabled authentication as well.
Username & Password This works with environments without MFA-enabled and needs no extra configuration.
Client Id & Secret This works with MFA-enabled authentication but needs extra configuration of Azure AD App Registration. To know more on app registration process read here.
Azure If you are already logged in inside VSCode using Az extension, Azure CLI or Azure PowerShell, you can leverage Azure Identity Framework to get authenticated against Dataverse. The developer has to use the same account for both Azure and Power Platform for this work (thanks to Natraj Yegnaraman for this method). This is a single-click authentication method with no prompts.

Below is one of the way you can create the connection.

Create & Connect

Remembers the connected environment per workspace

Once you connect to your preferred Dataverse Environment; the tool will rememeber the connection for that workspace/folder.

Silent Connection Reload

See connection and entity details (with copy feature)

This provides an ability for you to quikly check the details of the connection and also copy certain important information.

See Details

Initialize TypeScript project & add TS File

You can instantiate a TypeScript project for Dataverse that automatically installs all the prerequisites needed:

Below procecss shows how you can create a TypeScript project for Dataverse with one of the available options and also how you can add a TypeScript file that loads the code-snippet.

TypeScript Project

TypeScript File

Generate Typings

Typings help you write early-bound code. And with the help of @types/xrm you can provide types to all of your variables/methods.

Typings are also integrated with @types/xrm

Typings

Intellisense for type generated

When you generate typings for entities you are provided with an intellisense; provided you have casted the FormContext into proper Entity type.

IntellisenseTypeScript

Upload Web Resources

Once you build your project you can upload your script directly from the VS Code with the help of Dataverse DevTools.

WebResourceUpload

Filter by solution

Entities

FilterEntities

Web Resources

FilterWRs

Smart Match Web Resources

SmartMatch

โš’๏ธ Tools

You can launch your favorite Power Platform tools right from VSCode. Below are the list of currently integrated tools with DVDT.

Tool Name Author
Dataverse REST Builder Guido Preite
Plugin Registration Tool Microsoft
Configuration Migration Microsoft
Package Deployer Microsoft

๐Ÿ”ฅ Using Typings

Generate Typing

  1. Go to Dataverse DevTools from the Activity Side Bar.
  2. From the list of entities, right-click the entity for which you want to create a typing and choose Generate Typings option. You can also filter the list of entities by clicking the filter button on the Entities panel as shown here.

When working with Xrm object from @types/xrm

  1. Create a onLoad function in your TypeScript file with parameter as executionContext: Xrm.Events.EventContext.
  2. Initialize your FormContext global variable casting it with Xrm.<entity name>.

For example: If you wanted to use Accounts entity typings in your TypeScript file then after the typings are generated the code in your TypeScript file will look as shown below:

export function onLoad(executionContext: Xrm.Events.EventContext) {
    const formContext: Xrm.Account = executionContext.getFormContext();
    formContext.getAttribute("accountnumber").getValue();
}

In the above code snippet, Xrm.Account is a typing generated by Dataverse DevTools to provide intellisense specific to the Account entity.

When working with entity and attributes only

  1. Just use by typings the entity name

For example: If you wanted to use Accounts entity typings in your TypeScript file then after the typings are generated the code in your TypeScript file will look as shown below:

let fetchAccount =
  `<fetch>
    <entity name="${Account.EntityLogicalName}">
      <attribute name="${Account.Attribute.accountid}" />
      <attribute name="${Account.Attribute.telephone1}" />
    </entity>
  </fetch>`;

๐ŸŽฎ Power Platform CLI Commands

All the Power Platform CLI commands are easily categorized in a tree format that enables you to execute them with a button-click. If any command needs a parameter then system will intelligently prompt for the input from you. At this time only required parameters will be prompted by the system. Please see it in action below:

PacCliCommands

PacCliModelBuilder

๐ŸŽ Early-Access Preview

This list showcases the features that are build and ready but not fully tested to be released. You can enable these features by navigating to File > Preferences > Settings and search for Dataverse DevTools and make sure Enable Early Access Preview is checked.

No features in early-access at the moment.

๐Ÿงช Alpha-Testing

There are different ways in which you can contribute to this open-source project. One of the way is to be part of alpha-testing. In order to perform alpha-testing follow the below steps:

  • Fork this project and clone it on your local machine
  • Identify the changes in alpha-test mode (list is mentioned below)
  • Open the project in VS Code
  • Navigate to Run and Debug from Activity Bar
  • Make sure Run Extension is selected; click on โ–ถ๏ธ icon.
  • This will open another VS Code instance, this instance will have Extention Development Host on it's title
  • You are ready to perform your tests

โŒš Features available for alpha-test

No features in alpha-testing at the moment.

Report any issues or feedback on GitHub.

๐Ÿ’ญ Planned Features

โœจ Contributing

We encourage you to pitch in, join the team and showcase your name on this repo. If you are unsure how you can contribute, please reach out to Power Maverick.

Different ways to contribute:

  • Improve the code or fix a bug by creating a Pull Request.
  • Get involved in Alpha & Beta tests.
  • Provide suggestions, feedback or feature request on GitHub.
  • Report issues & bugs on GitHub.
  • Answer any open questions on the Discussion Board.
  • Join Power Platform LevelUP community on Discord to answer any of the questions that may rise w.r.t. this tool.

Before creating the pull request for contributing, please read the Contributing Guidelines.

Thanks goes to these wonderful people (emoji key):

Danish Naglekar
Danish Naglekar

๐Ÿ’ฌ ๐Ÿ’ป ๐Ÿ–‹ ๐ŸŽจ ๐Ÿ“– ๐Ÿš‡ ๐Ÿ›ก๏ธ โš ๏ธ ๐Ÿ”ง โœ…
mohsinonxrm
mohsinonxrm

๐Ÿ’ฌ ๐Ÿ› ๐Ÿ’ป ๐Ÿ’ก ๐Ÿค” ๐Ÿ”Œ ๐Ÿ”ฌ ๐Ÿ““
Josh Smith
Josh Smith

๐Ÿ› ๐Ÿšง ๐Ÿ““
P-focT
P-focT

๐Ÿ› ๐Ÿšง ๐Ÿ““
Benedikt Bergmann
Benedikt Bergmann

๐Ÿ’ก ๐Ÿค”
Phil Cole
Phil Cole

๐Ÿ› ๐Ÿค”
Jeff Dodds
Jeff Dodds

๐Ÿง‘โ€๐Ÿซ
MattB
MattB

๐Ÿง‘โ€๐Ÿซ
Thomas Sandsรธr
Thomas Sandsรธr

๐Ÿ› ๐Ÿค” โš ๏ธ ๐Ÿ““
glemis
glemis

๐Ÿ› ๐Ÿ’ป โš ๏ธ ๐Ÿ““
Eric Regnier
Eric Regnier

๐Ÿ›
Guido Preite
Guido Preite

๐Ÿ› ๐Ÿ’ป ๐Ÿš‡ โš ๏ธ ๐Ÿšง ๐Ÿ““
SatkunamSuganthar
SatkunamSuganthar

๐Ÿ›
Natraj Yegnaraman
Natraj Yegnaraman

๐Ÿ’ป ๐Ÿ–‹ ๐ŸŽจ ๐Ÿ’ก ๐Ÿค” ๐Ÿšง ๐Ÿ›ก๏ธ ๐Ÿ““ ๐Ÿ”ง
Andrew Petrochuk
Andrew Petrochuk

๐Ÿ”ฃ ๐Ÿค”
Lars Hildebrandt
Lars Hildebrandt

๐Ÿ’ป ๐Ÿค” ๐Ÿ› ๐Ÿšง โš ๏ธ
Rob Montague
Rob Montague

๐Ÿ› ๐Ÿ““
Kinga
Kinga

๐Ÿ› ๐Ÿ’ป ๐Ÿšง โš ๏ธ ๐Ÿ““

This project follows the all-contributors specification. Contributions of any kind welcome!

๐Ÿ”‰ Discussions

If you want to have any discussions on any feature, please use the Discussion Board.

๐Ÿ“ƒ License

This software is released under MIT License

โœ Credits

Icons sourced from - https://icon-sets.iconify.design

JSON to TypeScript conversions - https://quicktype.io/typescript

About

The all-in-one tool to develop code for Dataverse/Dynamics 365. Helps you connect to a Dataverse environment, generate TypeScript definitions for entities, create a different type of Dataverse-specific projects, and much more.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project