microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
732 stars 243 forks source link

Cannot download symbols for D365 BC Trial version #7550

Closed kgowthampqube closed 10 months ago

kgowthampqube commented 11 months ago

I am a beginner in D365 Business Central and we are evaluating the product. I have signed up for Business Central online (cloud) trial. Trying to do customization via VS Code. Here are the steps I followed:

  1. Installed AL Language extension for Microsoft Dynamics 365 Business Central (v12.1.883011)
  2. Restarted the VS Code
  3. Ctrl + Shift + P - Created a new project
  4. Here is how my launch.json looks like: { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "Microsoft cloud sandbox", "request": "launch", "type": "al", "tenant": "my-org-tenant-id", "environmentType": "Sandbox", "environmentName": "Production", //As in D365 BC admin center "startupObjectId": 22, "startupObjectType": "Page", "breakOnError": "All", "launchBrowser": true, "enableLongRunningSqlStatements": true, "enableSqlInformationDebugger": true } ] }
  5. This is how my app.json looks like: { "id": "2a141577-42be-4c50-a715-94a96b040845", "name": "Learn_customization", "publisher": "Default publisher", "version": "1.0.0.0", "brief": "", "description": "", "privacyStatement": "", "EULA": "", "help": "", "url": "", "logo": "", "dependencies": [], "screenshots": [], "platform": "1.0.0.0", "application": "23.0.0.0", "idRanges": [ { "from": 50100, "to": 50149 } ], "resourceExposurePolicy": { "allowDebugging": true, "allowDownloadingSource": true, "includeSourceInSymbolFile": true }, "runtime": "12.0", "features": [ "NoImplicitWith" ] }
  6. Tried to download symbols with - Ctrl - Shift + P --> AL: Download Symbols
  7. Download fails with following errors in the console: [2023-10-19 14:43:08.13] Using reference symbols cache paths: [c:\Data\Repos\D365BizCentral_Learning\Learn_customization.alpackages] [2023-10-19 14:43:08.15] Sending request to https://api.businesscentral.dynamics.com/v2.0/Production/dev/metadata?tenant=my-org-tenant-id [2023-10-19 14:43:29.74] Error: An error occured while processing the request. Request ID: fe5a4bc8----0d4f3c1d84df Session ID: 6a65a065----7bf95178b076

If you are targeting a cloud instance, supply these IDs if contacting Microsoft support. [2023-10-19 14:43:29.74] The request for path /v2.0/Production/dev/metadata?tenant=my-org-tenant-id failed with code InternalServerError. Reason: Internal Server Error [2023-10-19 14:43:29.75] Sending request to https://api.businesscentral.dynamics.com/v2.0/Production/dev/metadata?tenant=my-org-tenant-id [2023-10-19 14:43:52.16] Error: An error occured while processing the request. Request ID: 29b053c0----3a209cb05bb1 Session ID: 6a65a065----7bf95178b076

Can anyone help me figuring out what I'm doing wrong here?

rolandpthompson commented 11 months ago

You need to replace my-org-tenant-id with the tenant Id from the environment. When in the BC admin center it’s the guid in the url

Other than that, you have environmentType = sandbox, and environmentName of production. So, you created a Sandbox and called it Production?

From: kgowthampqube @.> Sent: Thursday, October 19, 2023 10:18 AM To: microsoft/AL @.> Cc: Subscribed @.***> Subject: [microsoft/AL] Cannot download symbols for D365 BC Trial version (Issue #7550)

I am a beginner in D365 Business Central and we are evaluating the product. I have signed up for Business Central online (cloud) trial. Trying to do customization via VS Code. Here are the steps I followed:

  1. Installed AL Language extension for Microsoft Dynamics 365 Business Central (v12.1.883011)
  2. Restarted the VS Code
  3. Ctrl + Shift + P - Created a new project
  4. Here is how my launch.json looks like: { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "Microsoft cloud sandbox", "request": "launch", "type": "al", "tenant": "my-org-tenant-id", "environmentType": "Sandbox", "environmentName": "Production", //As in D365 BC admin center "startupObjectId": 22, "startupObjectType": "Page", "breakOnError": "All", "launchBrowser": true, "enableLongRunningSqlStatements": true, "enableSqlInformationDebugger": true } ] }
  5. This is how my app.json looks like: { "id": "2a141577-42be-4c50-a715-94a96b040845", "name": "Learn_customization", "publisher": "Default publisher", "version": "1.0.0.0", "brief": "", "description": "", "privacyStatement": "", "EULA": "", "help": "", "url": "", "logo": "", "dependencies": [], "screenshots": [], "platform": "1.0.0.0", "application": "23.0.0.0", "idRanges": [ { "from": 50100, "to": 50149 } ], "resourceExposurePolicy": { "allowDebugging": true, "allowDownloadingSource": true, "includeSourceInSymbolFile": true }, "runtime": "12.0", "features": [ "NoImplicitWith" ] }
  6. Tried to download symbols with - Ctrl - Shift + P --> AL: Download Symbols
  7. Download fails with following errors in the console: [2023-10-19 14:43:08.13] Using reference symbols cache paths: [c:\Data\Repos\D365BizCentral_Learning\Learn_customization.alpackages] [2023-10-19 14:43:08.15] Sending request to https://api.businesscentral.dynamics.com/v2.0/Production/dev/metadata?tenant=my-org-tenant-id [2023-10-19 14:43:29.74] Error: An error occured while processing the request. Request ID: fe5a4bc8----0d4f3c1d84df Session ID: 6a65a065----7bf95178b076

If you are targeting a cloud instance, supply these IDs if contacting Microsoft support. [2023-10-19 14:43:29.74] The request for path /v2.0/Production/dev/metadata?tenant=my-org-tenant-id failed with code InternalServerError. Reason: Internal Server Error [2023-10-19 14:43:29.75] Sending request to https://api.businesscentral.dynamics.com/v2.0/Production/dev/metadata?tenant=my-org-tenant-id [2023-10-19 14:43:52.16] Error: An error occured while processing the request. Request ID: 29b053c0----3a209cb05bb1 Session ID: 6a65a065----7bf95178b076

Can anyone help me figuring out what I'm doing wrong here?

— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/AL/issues/7550, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABTP3R32P2UZ3T2M66KF3PLYADV27AVCNFSM6AAAAAA6G3LRJ6VHI2DSMVQWIX3LMV43ASLTON2WKOZRHE2TCNRZGM3TMOI. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>>

kgowthampqube commented 11 months ago
  1. Yeah I did replace the tenant id. While accessing the BC api in post man, say for example read all companies with same tenant id, was able to receive expected response in the environment named : "Production".
  2. I did not set up the environment. Just signed up for a trial. Should I set up a new sandbox environment? Is there any specific role needed for extension development? D365 Extn Mgmt role has been added to my account, but it seems to be obsolete. I have Super user role assigned to my account
rolandpthompson commented 11 months ago

You cannot push a PTE extension from VS Code to a production environment. In the admin center, copy the production environment to a type of sandbox and give it a name. For instance mine are typically QA, and my launch file would then look like

{ "version": "0.2.0", "configurations": [ { "type": "al", "request": "launch", "name": "cloud sandbox", "tenant": "123c12e3-fecb-41ea-9f37-b5dc260ab17d", "environmentType": "Sandbox", "environmentName": "QA", "breakOnError": "ExcludeTry", "launchBrowser": true, "enableLongRunningSqlStatements": true, "enableSqlInformationDebugger": true } ] }

Note the tenant id should be yours (and the above tenant id is not a valid one - just a guid example) That should allow you to get the symbols and push to the sandbox

For Production, you need to manually upload the PTE app file, or use something like AL-go

kgowthampqube commented 11 months ago

Thanks a lot. It worked.

pborring commented 10 months ago

Closing as configuration/setup question and resolved by friendly partner