< Back

New-ProvDyn365Entity

Sun Jan 19, 2020 5:39 pm

NAME New-ProvDyn365Entity



SYNOPSIS

Create a new entity in Dynamics365/ProvanceITSM.





SYNTAX

New-ProvDyn365Entity -AuthContext <object> -Body <object> -EntityName <string> [-APIVersion <string>]

[-IncludeFormattedValue <SwitchParameter>] [-SelectSection <string>] [<CommonParameters>]





DESCRIPTION

This cmdlet creates a new entity in a Dynamics365/ProvanceITSM instance via the WEB API with defined values





PARAMETERS

-AuthContext <object>

The Authentication context generated by Get-ProvAzureAuthContext



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-EntityName <string>

The logical name of the entity in Dynamics365/ProvanceITSM. This value is case sensitive !



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Body <object>

A hasttable or properties for the new entity. Refer to the entities metadata, to figure out possible

properties and values.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SelectSection <string>

The output filter for the entities, defined by a field name array, i.e. "name,address1". (PS: the id of the

entity will always be returned) When you select more than one value put the values inside quotes and seperate

them by commas.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-IncludeFormattedValue <SwitchParameter>





Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-APIVersion <string>

The Web-API Version used to query. Default is 'v9.0'".



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

System.Collections.Hashtable





---------- EXAMPLE 1 ----------



Create a new Account





New-ProvDyn365Entity -AuthContext $token -EntityName account -Body $bodyAcc -selectSection "name, description"





The "body" object is a hashtable, providing the values for the new account. Creation of the body hastable works

like the example below:

$bodyAcc = @{

"name" = "Provance"

"creditonhold" = $false

"description" = "This is the description of the Provance account"

"accountcategorycode" = 1

}



The -Selectsection parameter defines, which values are returned after successful creation of the entity. By

default, the cmdlet returns all values.

The example above limits the output to description and name.

The id of the entity is always returned.

The $token object is generated by the cmdlet Provance.AzureAuthcontext which can be found in the Provance.Azure

Module.





RELATED LINKS

Provance Technologies Inc. (http://provance.com)

Help (http://help.provance.com)