web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

NavNCLDialogException error Business Central when calling CopyProfileWithUserInput

(0) ShareShare
ReportReport
Posted on by 96
Hello everyone,
I’m facing an issue while trying to programmatically create a profile by copying the "RAPIDSTART SERVICES" profile into a new one.
ConfPersonalizationMgt.CopyProfileWithUserInput(profileSrcRec, profileNewRec);

I get this exception:

Exception of type 'Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLDialogException' was thrown.
Stack trace:
"Conf./Personalization Mgt." (CodeUnit 9170).CopyProfileWithUserInput
line 5 - Base Application version 27.1.41698.42312

My code:
procedure createProfile()
var
    profileNewRec: Record "All Profile";
    profileSrcRec: Record "All Profile";
    ConfPersonalizationMgt: Codeunit "Conf./Personalization Mgt.";
begin
    profileSrcRec.Reset();
    profileSrcRec.SetRange("Profile ID", 'RAPIDSTART SERVICES');
    if profileSrcRec.FindFirst() then begin
        ConfPersonalizationMgt.CopyProfileWithUserInput(profileSrcRec, profileNewRec);
        if profileNewRec.Get(profileNewRec.Scope, profileNewRec."App ID", profileNewRec."Profile ID") then begin
            Message('Profile %1 created successfully.', profileNewRec."Profile ID");
        end;
    end;
end;

What I suspect

It seems the method CopyProfileWithUserInput internally tries to open a dialog or confirmation page — which cannot run in background or non-UI contexts → resulting in NavNCLDialogException.

My question

Has anyone successfully used this method from AL code without triggering a dialog?

Is there an alternative to copy a profile silently, without UI interaction?

(For example: using CopyProfile()

Any insights would be greatly appreciated!

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,790

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 3,371 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 2,034 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans