Skip to content

Instantly share code, notes, and snippets.

@RobertWaiteREPAY
Last active November 18, 2020 00:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobertWaiteREPAY/d0d2bc5697328a1c7da063797482e325 to your computer and use it in GitHub Desktop.
Save RobertWaiteREPAY/d0d2bc5697328a1c7da063797482e325 to your computer and use it in GitHub Desktop.
PSBlog011
Function Check-Invoice
{
param(
[Parameter(Mandatory=$true)]
[Microsoft.PowerShell.Commands.WebRequestSession]$WebSession,
$EndPoint = $env:AcumaticaTestEndPoint,
[Parameter(Mandatory=$true)]
$DocDesc,
[Parameter(Mandatory=$true)]
$CustomerNbr)
$HashArguments = @{
Uri = "$EndPoint/entity/default/18.200.001/Invoice?`$Filter=DocDesk eq `'$DocDesc`' and CustomerNbr eq `'$DocDesc`'"
Method = 'GET'
Headers = $headers
WebSession = $WebSession}
$response = Invoke-RestMethod @HashArguments
$InvoiceAsPSObject = $response | ConvertTo-Json
return [String]::IsNullOrEmpty($InvoiceAsPSObject)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment