Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
PSBlog008
Function Get-Invoice
{
param(
[Parameter(Mandatory=$true)]
[Microsoft.PowerShell.Commands.WebRequestSession]$WebSession,
$EndPoint = $env:AcumaticaTestEndPoint,
[Parameter(Mandatory=$true)]
$ReferenceNbr)
$HashArguments = @{
Uri = "$EndPoint/entity/default/18.200.001/Invoice?`$Filter=ReferenceNbr eq `'$ReferenceNbr`'"
Method = 'GET'
Headers = $headers
WebSession = $WebSession}
$response = Invoke-RestMethod @HashArguments
$InvoiceAsPSObject = $response | ConvertTo-Json | ConvertFrom-Json
Return $InvoiceAsPSObject
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.