-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtest.ps1
30 lines (21 loc) · 1.32 KB
/
test.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Load DLL's
Add-type -Path "C:\Users\freddyk\Documents\GitHub\NAVDEMO\RunTests\Test Assemblies\Microsoft.Dynamics.Framework.UI.Client.dll"
Add-type -Path "C:\Users\freddyk\Documents\GitHub\NAVDEMO\RunTests\Test Assemblies\NewtonSoft.json.dll"
."C:\ProgramData\NavContainerHelper\Extensions\fkx\PsTestTool\ClientContext.ps1"
$clientcontext = [ClientContext]::new("http://fkx/NAV/cs", $credential, ([timespan]::FromMinutes(10)), "en-US")
$form = $clientcontext.OpenForm(130409)
$clientcontext.GetErrorFromErrorForm()
$clientcontext.GetFormInfo($form[0])
$windowsusername = "user manager\containeradministrator"
#New-NavContainerNavUser -containerName fkdev -WindowsAccount $windowsusername -PermissionSetId SUPER
Invoke-ScriptInNavContainer -containerName fkdev {
$newtonSoftDllPath = (Get-Item "C:\Program Files\Microsoft Dynamics NAV\*\Service\NewtonSoft.json.dll").FullName
$clientDllPath = "C:\Test Assemblies\Microsoft.Dynamics.Framework.UI.Client.dll"
Add-type -Path $clientDllPath
Add-type -Path $newtonSoftDllPath
. "C:\ProgramData\NavContainerHelper\PsTestTool\ClientContext.ps1"
$clientcontext = [ClientContext]::new("http://fkdev/NAV/cs", ([timespan]::FromMinutes(10)), "en-US")
whoami
$form = $clientcontext.OpenForm(61266)
$clientcontext.GetFormInfo($form)
}