Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot download symbols for D365 BC Trial version #7550

Closed
kgowthampqube opened this issue Oct 19, 2023 · 5 comments
Closed

Cannot download symbols for D365 BC Trial version #7550

kgowthampqube opened this issue Oct 19, 2023 · 5 comments
Labels

Comments

@kgowthampqube
Copy link

kgowthampqube commented Oct 19, 2023

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
Copy link

rolandpthompson commented Oct 19, 2023 via email

@kgowthampqube
Copy link
Author

  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
Copy link

rolandpthompson commented Oct 19, 2023

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
Copy link
Author

Thanks a lot. It worked.

@pborring
Copy link
Contributor

Closing as configuration/setup question and resolved by friendly partner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants