Skip to content

Instantly share code, notes, and snippets.

@DanKinsella
DanKinsella / LSPOSCommandDemo.Codeunit.al
Last active Jun 14, 2020
Creating an LS Central POS command
View LSPOSCommandDemo.Codeunit.al
codeunit 50100 "LS POS Command Demo"
{
TableNo = "POS Menu Line";
trigger OnRun()
begin
if Rec."Registration Mode" then
Register(Rec)
else
case Rec.Command of
View Uninstall dependencies.ps1
# Change searchApp to the name of your app, the script will uninstall any dependent apps
$searchApp = 'Customer Additional Fields'
$apps = get-navappinfo uat
foreach ($app in $apps)
{
$appdetail = Get-navappinfo uat -name $app.Name
foreach ($dependency in $appdetail.Dependencies) {
if ($dependency.Name -eq $searchApp) {
Write-Host 'Uninstalling ' $appDetail.Name ' ' $appDetail.Version
Uninstall-Navapp uat -name $appDetail.Name
You can’t perform that action at this time.