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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

NavNCLDialogException error Business Central when calling CopyProfileWithUserInput

(7) ShareShare
ReportReport
Posted on by 111
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)
  • Suggested answer
    OussamaSabbouh Profile Picture
    12,808 Super User 2026 Season 1 on at
    Hello,
     
    As per AI generation i found this
     
    CopyProfileWithUserInput always opens a dialog, so it cannot be used in background code → that’s why you get NavNCLDialogException.
     
    If you need a silent copy (no UI), you must:
     
    Use the non-UI CopyProfile(...) method instead, or
     
    Manually copy the profile records yourself.
     
     
    So:
    UI → CopyProfileWithUserInput
    No UI → CopyProfile (silent) / custom logic
     
    Regards,
    Oussama Sabbouh
  • Suggested answer
    YUN ZHU Profile Picture
    99,055 Super User 2026 Season 1 on at
    I'm sorry, I haven't tested it in detail. Try the following method.
     
    Thanks
    ZHU

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,926 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,158 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 533 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans