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 :
Business Central forum

Install Codeunit Throwing an Error Code:85132273

(0) ShareShare
ReportReport
Posted on by

Hello,

I have developed an extension in AL for D365 BC. Now I am writing an install codeunit. In this codeunit, I want to open a control add-in page for app registration and configuration when installing the app in business central. the code is below

codeunit 50140 InstallCodeUnit
{
    Subtype = Install;

    trigger OnInstallAppPerCompany()
    var
        myAppInfo: ModuleInfo;

    begin
        NavApp.GetCurrentModuleInfo(myAppInfo); // Get info about the currently executing module
                                             
        if myAppInfo.DataVersion = Version.Create(1, 0, 0, 0) then 
            HandleFreshInstall
        
    end;

    local procedure HandleFreshInstall();
    var
        reg: Page SGRegistration; // Control Add-in page to be opened first on install
    begin
        reg.RunModal();
    end;
   
}
whenever I hit F5 to install the application in sanbox environment, it throws the following error:
The request for path /v1.0/sandbox/dev/apps?SchemaUpdateMode=synchronize failed with code 422. Reason: Could not install the extension SendGridNew on tenant due to the following error: Error code: 85132273.
CAN SOMEBODY HELP ME IN THIS? AM I MISSING SOMETHING OR DOING WRONG.
Categories:
  • Suggested answer
    Peter Zentner Profile Picture
    390 on at

    You cannot run UI in the install. Install is done as an automated process, so it is throwing an error when you are trying to use anything UI related. I would suggest that you do this at some other point in time, after the extension is installed.

    Remember that someone can install your extension and not use it for months. There are not even permissions setup to use your extension, so even if the install would allow the display of UI, it would fail, because the user doesn't have permissions to the page or table or anything else that you are addressing there.

    There should not be anything in the way of using the system as it is before the extension is installed. Once the user sets up your extension, then it should be used. This also means that this would be the right place to do some registration form.

  • Avinash B Profile Picture
    1,455 on at

    Hi

    Look at the below link. It actually helped me come out of the problem. It might also help you.

    blog.jonathanchye.co.uk/.../

    Regards

    Avinash B

  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,306 Super User 2026 Season 1 on at

    The install codeunit should not give a user interface.

    You can create a logic that send notification to user to setup your app when opening the role center.

  • Community Member Profile Picture
    on at

    Thank you, everyone

    All the answers explained to me very well about the install codeunit functionality. Now I will get it working soon.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans