Skip to content

Latest commit

 

History

History
60 lines (41 loc) · 3.44 KB

File metadata and controls

60 lines (41 loc) · 3.44 KB

JsonToCsharp

A xrmtoolbox plugin for Dynamic36 webapi to convert the json to CSharp models. You can also use this tool to convert any json to c# models. This tool requires only OAuth or Certificate types connection to get crm entities as it connects to WebAPI.
For how to connect and working examples please see below.

How to Connect in xrmtoolbox (connection Types)

Once you have the xrmtoolbox you need to install this plugin form Tool Library as shown below. xrmtoolbox connections

Once the installion is done, you will see this plugin as follows: xrmtoolbox connections

Since this plugin connects to CE webapi so by default it requires OAuth or Certifcate type connections in xrmtoolbox.
For example regarding available OAuth connections in xrmtools are mentioned below:

xrmtoolbox connections

Some examples are as follows.

xrmtoolbox connections

xrmtoolbox connections AuthType=OAuth;Username=jsmith@contoso.onmicrosoft.com; Password=passcode; Url=https://contoso:8080/Test;AppId=;RedirectUri=app://; LoginPrompt=Never

Examples

Once you are connected through OAuth connection, by default the plugin will load all the mostly used entities as list. By default it will load the accounts entity and display only one random record, so the json is availble for conversion or customization or properties changes.
Also you can entirely replace the crm json and paste your own valid json for relevant csharp classes. Please see the screen shots below.

Crm Entities Loaded

entities loaded

Crm Entities Json

entities json

Custom Json

entities json



For more help about CE connection strings. here
See more info about CE WebAPI authentication methods. here.
For more help you can raise an issuse here

Just an reminder the null values in json crossponds to object in c# class, becuase the parser expect some valid cli types instead we have null in value and hence currently parser is not able to determine the valid type and it puts object type.

Next Releases Features (1.0.0.2) 👍

  1. Will add the possiblity to select entities and their attributes to build json. (select or search)
  2. Formatted json display in box.

Feel free let me know about new features you want and any improvents you thought. I will try to address as soon as possible.
you can riase new issues/fearures here.

Adnan Samuel