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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Business Central Connection Issue

(0) ShareShare
ReportReport
Posted on by 25

Hi All,

I am a developer and i have started my hands-on Dynamics 365 Business Central. So I have downloaded Visual Studio code application and i have written a sample message of Hello world but the problem is its pointing to wrong Server Configuration when i run the code. I know its something related to launch.jason file in my workspace, but i dont know what excalty to do on it.

Can somebody please help?

Thanks in Advance

I have the same question (0)
  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    In the launch.json file you need to set the parameter of the environment where you want to deploy your extension. As an example (server hosted by your own):

    {
                "type": "al",
                "request": "launch",
                "name": "D365BCDEVVM",
                "server": "YOURSERVERNAME",
                "serverInstance": "BC",
                "authentication": "UserPassword",
                "startupObjectId": 22,
                "startupObjectType": "Page",
                "breakOnError": true,
                "launchBrowser": true,
                "enableLongRunningSqlStatements": true,
                "enableSqlInformationDebugger": true,            
            }
  • Priyanka05021986 Profile Picture
    105 on at

    Hi Stefano,

    In the Server section ,we are giving the Sandbox URL which we intend to point to. But its not opening to the correct one.

  • Suggested answer
    Raju Gudipalli Profile Picture
    185 on at

    Connection should be like this to connect sandbox environment.

    below URL is the sample one,from the URL u need to copy  <tenantid> and pase at tenant on connection,<sandboxname> is name of the sandbox u need to paste at sandboxname on connection. 

    https://businesscentral.dynamics.com/<tenantid>/<Sandboxname>

    Capturelaunch.PNG

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    For the online sandbox environment, you don't need server and serverinstance, they're automatically retrieved from your Azure AAD acount.

    The launch.json file is the following:

    {

       "version": "0.2.0",

       "configurations": [

           {

               "type": "al",

               "request": "launch",

               "name": "Microsoft cloud sandbox",

               "startupObjectId": 22,

               "startupObjectType": "Page",

               "breakOnError": true,

               "launchBrowser": true,

               "enableLongRunningSqlStatements": true,

               "enableSqlInformationDebugger": true

           }

       ]

    }

  • Priyanka05021986 Profile Picture
    105 on at

    About the Azure AAD account can you please tell me more about it?  Do we have to give some information about Azure AAD account in VS code app.? Maybe thats the catch, cuz  i have written the same exact code on the launch.jason file but still its opening the wrong sandbox. Please help Stefano!

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    With the above launch.json file, it opens the default sandbox environment (called Sandox). If you want to connect to a different sandbox, you can specify the sandboxName parameter:

    "sandboxName""YOURSANDBOX"
  • Priyanka05021986 Profile Picture
    105 on at

    So should the code be like this give below? Also the value for the sandboxName parameter should be the URL or is it a string value?

    {

      "version": "0.2.0",

      "configurations": [

          {

              "type": "al",

              "request": "launch",

              //"name": "Microsoft cloud sandbox", "sandboxName": "YOURSANDBOX",

              "startupObjectId": 22,

              "startupObjectType": "Page",

              "breakOnError": true,

              "launchBrowser": true,

              "enableLongRunningSqlStatements": true,

              "enableSqlInformationDebugger": true

          }

      ]

    }

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    Name is the name of your environment (give a name that you want, it's used to identify the environment inside VS Code). sandboxName is the name of your sandbox. Yes, it's a string, not an url. It's the name you've assigned to your secondary sandbox when you've created it.

  • Priyanka05021986 Profile Picture
    105 on at

    OKay, i have given the sandboxName parameter in the code which " Dev Training". but its still opening the default sandbox environment (called Sandox).

    pastedimage1574336274929v1.png

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    The extension should be deployed to the sandbox called “DevTraining”. Switch the environment to the new sandbox and on Extension Management page you should see the deployed extension.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,238

#2
YUN ZHU Profile Picture

YUN ZHU 773 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 630

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans