-
Notifications
You must be signed in to change notification settings - Fork 20
OData Export
Rasmus Andersen edited this page Sep 28, 2018
·
3 revisions
This is based upon a Authority configuration is loaded into $Config
On how to do this, please take a look at the Authority configuration page
The module is allready installed and importet, if not you can do the following
Install-Module -Name d365fo.integrations
Import-Module d365fo.integrations
- Lets get the Data Entities
$dataEntity = Export-D365OData @Config -Entity 'data'
- Lets convert the result into a json object
$dataEntityJson = convertfrom-json $dataentity
- Lets find some something regarding workers and sort the result
$dataEntityJson.value `
| where-object name -like '*Worker*' `
| Sort-Object -Descending -Property name
Some of the entries returned :
name | kind | url |
---|---|---|
WorkerTrustedPositions | EntitySet | WorkerTrustedPositions |
WorkerTaxRegions | EntitySet | WorkerTaxRegions |
WorkerTaxCodeParameters | EntitySet | WorkerTaxCodeParameters |
WorkerTasks | EntitySet | WorkerTasks |
WorkerSummaries | EntitySet | WorkerSummaries |
WorkerSkills | EntitySet | WorkerSkills |
Workers | EntitySet | Workers |
- Lets find a worker, lets take 4711, and just convert him to json rightaway
$worker = Export-D365OData @Config `
-Entity "data/Workers?`$filter=PersonnelNumber eq '4711'" `
| ConvertFrom-Json`
- Lets find his name, firstname and lastname
$worker.value | Select-Object -Property Name,FirstName,LastName
Name | FirstName | LastName |
---|---|---|
D365 Integration | D365 | Integration |
- Install as a non-Administrator
- Install as a Administrator
- Import d365fo.integrations module
- List available commands from d365fo.integrations module
- Get help content for a command