Dynamics 365 Business Central: Can we extend standard APIs? – Download Standard Source Code for APIs

Dynamics 365 Business Central

Hi, Readers.
Today I would like to talk about a question that is often asked. Can we extend standard APIs in Business Central.

With Business Central you can create Connect apps. Connect apps establish a point-to-point connection between Dynamics 365 Business Central and a 3rd party solution or service and is typically created using standard REST API to interchange data. Any coding language capable of calling REST APIs can be used to develop your Connect app. Microsoft has prepared many standard APIs for us. In BC21, Microsoft also added new dedicated APIs for financial.

PS: Welcome to the API(v2.0) for Business Central and A simple way to view the list of all APIs

But for customers, standard APIs may not fully meet their needs, and customization may need to be considered at this time.

First of all, the standard APIs are pages, PageType Property is API. (Pages of this type are used to generate web service endpoints and cannot be shown in the user interface.)

So can we use Page Extension Object to extend it? (The page extension object extends a Dynamics 365 Business Central page object and adds or overrides the functionality)

In short, so far this is impossible.

API Page Type:

This page type cannot be extended by creating a page extension object. Instead, you must create a new API by adding a page object.

The next question is, since we can’t extend standard APIs, how do we download the standard source code?

I will share three ways to do this.

1. Get to the source code of the default apps by Business Central Artifacts

The prerequisite is that the BcContainerHelper must already be installed.

Run the following command in Windows PowerShell ISE.
For example: Download the source code of the latest available version.

Get-BCArtifactUrl
Download-Artifacts -artifactUrl (Get-BCArtifactUrl)

Download speed depends on your internet speed.

After the download is complete, you can find the content you just downloaded in the “C:\bcartifacts.cache\sandbox” folder.

Then you can find all the Microsoft first-party app files in the “C:\bcartifacts.cache\sandbox\21.4.52563.52939\w1\Extensions” folder.

The source code files of the standard APIs can be found after unzipping the app file.
For example, “Microsoft__Exclude_APIV2__21.4.52563.52939\src\src\pages”

More details about Business Central Artifacts in Freddys blog.

2. Using “dependencies” property in app.json file. (The prerequisite is that you must know the information of the extension)

For example, API V2.0:

  "dependencies": [
    {
      "id": "10cb69d9-bc8a-4d27-970a-9e110e9db2a5",
      "name": "T_Exclude_APIV2_",
      "publisher": "Microsoft",
      "version": "21.0.0.0"
    }
  ]

Run AL: Download symbols command

Symbols have been downloaded.

Then you can find the app file for the API in the folder.

3. Using microsoft/ALAppExtensions (Microsoft AL application foundation modules and application add-ons for Microsoft Dynamics 365 Business Central)

For example, APIV2 -> pages:

4. Using MSDyn365BC.Code.History by provided Stefan Maroń

If you just want a reference and don’t want the latest version, you can just use it, Stefan will update it for us every month.👏👏👏

PS:
1. Here you can find more info on what to do with the source code of the standard APIs:
https://www.kauffmann.nl/2021/03/12/extending-standard-apis-1/
https://www.kauffmann.nl/2021/04/16/extending-standard-apis-2/

2. How to list all installed extensions/apps in your Business Central environment (Including hidden apps – “_Exclude_……”)

3. All app info of the Microsoft First Party Apps on the current version (BC 21.4).

idinitialVersionpublishOnlynamepublisherblockUninstallallowedUpdatespathversion
63ca2fa4-4f03-4f2b-a480-172fef340d3f21.4.52563.52939FALSESystem ApplicationMicrosoftTRUEhotfixMicrosoft_System Application_21.4.52563.52939.app21.4.52563.52939
437dbf0e-84ff-417a-965d-ed2bb965097221.4.52563.52939FALSEBase ApplicationMicrosoftTRUEhotfixMicrosoft_Base Application_21.4.52563.52939.app21.4.52563.52939
c1335042-3002-4257-bf8a-75c898ccb1b821.4.52563.52939FALSEApplicationMicrosoftTRUEhotfixMicrosoft_Application_21.4.52563.52939.app21.4.52563.52939
40860557-a18d-42ad-aecb-22b7dd80dc8021.4.52563.52939TRUEPermissions MockMicrosoftFALSEminorMicrosoft_Permissions Mock_21.4.52563.52939.app21.4.52563.52939
e7320ebb-08b3-4406-b1ec-b4927d3e280b21.4.52563.52939TRUEAnyMicrosoftFALSEminorMicrosoft_Any_21.4.52563.52939.app21.4.52563.52939
dd0be2ea-f733-4d65-bb34-a28f4624fb1421.4.52563.52939TRUELibrary AssertMicrosoftFALSEminorMicrosoft_Library Assert_21.4.52563.52939.app21.4.52563.52939
5095f467-0a01-4b99-99d1-9ff1237d286f21.4.52563.52939TRUELibrary Variable StorageMicrosoftFALSEminorMicrosoft_Library Variable Storage_21.4.52563.52939.app21.4.52563.52939
23de40a6-dfe8-4f80-80db-d70f83ce8caf21.4.52563.52939TRUETest RunnerMicrosoftFALSEminorMicrosoft_Test Runner_21.4.52563.52939.app21.4.52563.52939
75f1590f-55c5-4501-ae63-bada5534e85221.4.52563.52939TRUEPerformance ToolkitMicrosoftFALSEminorMicrosoft_Performance Toolkit_21.4.52563.52939.app21.4.52563.52939
063b3ac9-c464-4899-96e0-70d5425854e421.4.52563.52939FALSE_Exclude_AnonymizedDataSharing_MicrosoftFALSEminorMicrosoft__Exclude_AnonymizedDataSharing__21.4.52563.52939.app21.4.52563.52939
8afe7b40-8c87-4beb-ada0-451d1761bf9521.4.52563.52939FALSE_Exclude_APIV1_MicrosoftFALSEminorMicrosoft__Exclude_APIV1__21.4.52563.52939.app21.4.52563.52939
10cb69d9-bc8a-4d27-970a-9e110e9db2a521.4.52563.52939FALSE_Exclude_APIV2_MicrosoftFALSEminorMicrosoft__Exclude_APIV2__21.4.52563.52939.app21.4.52563.52939
5f92e0d5-a60e-435f-ae85-71ec28dd3e4121.4.52563.52939FALSE_Exclude_PlanConfiguration_MicrosoftFALSEminorMicrosoft__Exclude_PlanConfiguration__21.4.52563.52939.app21.4.52563.52939
8b3609cf-3947-44c3-9f20-ce6edc6da33f21.4.52563.52939FALSE_Exclude_ClientAddIns_MicrosoftFALSEminorMicrosoft__Exclude_ClientAddIns__21.4.52563.52939.app21.4.52563.52939
c526b3e9-b8ca-4683-81ba-fcd5f6b1472a21.4.52563.52939FALSESales and Inventory ForecastMicrosoftFALSEminorMicrosoft_Sales and Inventory Forecast_21.4.52563.52939.app21.4.52563.52939
2a89f298-7ffd-44a5-a7ce-e08dac98abce21.4.52563.52939FALSEEssential Business HeadlinesMicrosoftFALSEminorMicrosoft_Essential Business Headlines_21.4.52563.52939.app21.4.52563.52939
3d5b2137-efeb-4014-8489-41d37f8fd4c321.4.52563.52939FALSELate Payment PredictionMicrosoftFALSEminorMicrosoft_Late Payment Prediction_21.4.52563.52939.app21.4.52563.52939
ce917438-506c-4724-9b01-13c1b860e85121.4.52563.52939TRUEMicrosoft Pay PaymentsMicrosoftFALSEminorMicrosoft_Microsoft Pay Payments_21.4.52563.52939.app21.4.52563.52939
c512d720-63b9-4b26-b062-a0c09b4ed32221.4.52563.52939FALSECompany HubMicrosoftFALSEminorMicrosoft_Company Hub_21.4.52563.52939.app21.4.52563.52939
ec255f57-31d0-4ca2-b751-f2fa7c745abb21.4.52563.52939FALSEShopify ConnectorMicrosoftFALSEminorMicrosoft_Shopify Connector_21.4.52563.52939.app21.4.52563.52939
7819d79d-feea-4f09-bbed-5bbaca4bf32321.4.52563.52939FALSEData ArchiveMicrosoftFALSEminorMicrosoft_Data Archive_21.4.52563.52939.app21.4.52563.52939
ac14293f-1eb7-4a7b-9936-b280da31970b21.4.52563.52939FALSEData SearchMicrosoftFALSEminorMicrosoft_Data Search_21.4.52563.52939.app21.4.52563.52939
7961e9dc-a8e5-49b1-839b-3a78803a4cb821.4.52563.52939FALSETroubleshoot FA Ledger EntriesMicrosoftFALSEminorMicrosoft_Troubleshoot FA Ledger Entries_21.4.52563.52939.app21.4.52563.52939
d09fa965-9a2a-424d-b704-69f3b54ed0ce21.4.52563.52939FALSEPayment Links to PayPalMicrosoftFALSEminorMicrosoft_Payment Links to PayPal_21.4.52563.52939.app21.4.52563.52939
e86e9234-8b95-459d-a9ba-4d901208ca3821.4.52563.52939FALSE_Exclude_Microsoft Dynamics 365 – SmartListMicrosoftFALSEminorMicrosoft__Exclude_Microsoft Dynamics 365 – SmartList_21.4.52563.52939.app21.4.52563.52939
fbb56a54-4f3b-4d2f-9330-ed8921ec4ec721.4.52563.52939FALSE_Exclude_SyncBaseApp_MicrosoftFALSEminorMicrosoft__Exclude_SyncBaseApp__21.4.52563.52939.app21.4.52563.52939
a53a4bb0-aa53-8ff8-77d6-fe3388db0eb821.4.52563.52939FALSERecommended AppsMicrosoftFALSEminorMicrosoft_Recommended Apps_21.4.52563.52939.app21.4.52563.52939
16c26bda-5f9c-4a77-a17e-4835f06062c021.4.52563.52939FALSE_Exclude_Connectivity AppsMicrosoftFALSEminorMicrosoft__Exclude_Connectivity Apps_21.4.52563.52939.app21.4.52563.52939
e97bbbc7-16b6-470b-9428-376baa77897021.4.52563.52939FALSESend remittance advice by emailMicrosoftFALSEminorMicrosoft_Send remittance advice by email_21.4.52563.52939.app21.4.52563.52939
c50a4bf0-db51-4ad2-88d5-fe2287da0eb821.4.52563.52939FALSEVAT Group ManagementMicrosoftFALSEminorMicrosoft_VAT Group Management_21.4.52563.52939.app21.4.52563.52939
e6328152-bb29-4664-9dae-3bc7eaae1fd821.4.52563.52939FALSEEmail – Outlook REST APIMicrosoftFALSEminorMicrosoft_Email – Outlook REST API_21.4.52563.52939.app21.4.52563.52939
aceb66c8-472e-437c-81d3-27e6c07d0f1421.4.52563.52939FALSEEmail – Microsoft 365 ConnectorMicrosoftFALSEminorMicrosoft_Email – Microsoft 365 Connector_21.4.52563.52939.app21.4.52563.52939
08d69832-9231-429e-be2c-8bab2c96905b21.4.52563.52939FALSEEmail – Current User ConnectorMicrosoftFALSEminorMicrosoft_Email – Current User Connector_21.4.52563.52939.app21.4.52563.52939
8fc50dfb-d338-4fd9-9499-5e44cc8cbf5021.4.52563.52939FALSEEmail – SMTP APIMicrosoftFALSEminorMicrosoft_Email – SMTP API_21.4.52563.52939.app21.4.52563.52939
68e13fa3-217a-4be0-9141-99e5bf0ca81821.4.52563.52939FALSEEmail – SMTP ConnectorMicrosoftFALSEminorMicrosoft_Email – SMTP Connector_21.4.52563.52939.app21.4.52563.52939
114e4e19-182b-42e2-b5a9-91d8b8ee8ce121.4.52563.52939FALSE_Exclude_Email Logging Using Graph APIMicrosoftFALSEminorMicrosoft__Exclude_Email Logging Using Graph API_21.4.52563.52939.app21.4.52563.52939
7a129d06-5fd6-4fb6-b82b-0bf539c779d021.4.52563.52939FALSE_Exclude_Bank DepositsMicrosoftFALSEminorMicrosoft__Exclude_Bank Deposits_21.4.52563.52939.app21.4.52563.52939
a2cc2ef8-949f-43d4-45b8-10bd6f8bc62c21.4.52563.52939FALSEAPI Reports – FinanceMicrosoftFALSEminorMicrosoft_API Reports – Finance_21.4.52563.52939.app21.4.52563.52939
8c972578-fe72-4aa5-ae51-cc5575fef2ea21.4.52563.52939FALSESend To Email PrinterMicrosoftFALSEminorMicrosoft_Send To Email Printer_21.4.52563.52939.app21.4.52563.52939
2654d7e7-9afd-4947-9e02-6bb8f3e0cd0421.4.52563.52939FALSEUniversal Print IntegrationMicrosoftFALSEminorMicrosoft_Universal Print Integration_21.4.52563.52939.app21.4.52563.52939
79b1a79a-2f66-4736-bc1b-8abb3537eb5121.4.52563.52939FALSESimplified Bank Statement ImportMicrosoftFALSEminorMicrosoft_Simplified Bank Statement Import_21.4.52563.52939.app21.4.52563.52939
58623bfa-0559-4bc2-ae1c-0979c29fd9e021.4.52563.52939FALSEIntelligent Cloud BaseMicrosoftFALSEminorMicrosoft_Intelligent Cloud Base_21.4.52563.52939.app21.4.52563.52939
57623bfa-0559-4bc2-ae1c-0979c29fc8d121.4.52563.52939FALSEBusiness Central Cloud Migration APIMicrosoftFALSEminorMicrosoft_Business Central Cloud Migration API_21.4.52563.52939.app21.4.52563.52939
334ef79e-547e-4631-8ba1-7a7f18e14de621.4.52563.52939FALSEBusiness Central Intelligent CloudMicrosoftFALSEminorMicrosoft_Business Central Intelligent Cloud_21.4.52563.52939.app21.4.52563.52939
6992416f-3f39-4d3c-8242-3fff61350bea21.4.52563.52939FALSEBusiness Central Cloud Migration – Previous ReleaseMicrosoftFALSEminorMicrosoft_Business Central Cloud Migration – Previous Release_21.4.52563.52939.app21.4.52563.52939
6813edab-d08b-4d30-a119-11f984e0666921.4.52563.52939TRUECzech language (Czechia)MicrosoftFALSEminorMicrosoft_Czech language (Czechia)_21.4.52563.52939.app21.4.52563.52939
bdbd8422-02d6-4b5f-9a35-948c5700a43621.4.52563.52939TRUEDanish language (Denmark)MicrosoftFALSEminorMicrosoft_Danish language (Denmark)_21.4.52563.52939.app21.4.52563.52939
3a66faf9-4111-4ec3-be7e-7ca33e9421a021.4.52563.52939TRUEGerman language (Austria)MicrosoftFALSEminorMicrosoft_German language (Austria)_21.4.52563.52939.app21.4.52563.52939
4e7ce29d-c973-4e89-8230-5e13b26ce9fb21.4.52563.52939TRUEGerman language (Switzerland)MicrosoftFALSEminorMicrosoft_German language (Switzerland)_21.4.52563.52939.app21.4.52563.52939
e2d4cb5e-9120-4a92-824d-2e1e5dc1a69921.4.52563.52939TRUEGerman language (Germany)MicrosoftFALSEminorMicrosoft_German language (Germany)_21.4.52563.52939.app21.4.52563.52939
1732e878-cee4-4787-9456-05f25f4118da21.4.52563.52939TRUEEnglish language (Australia)MicrosoftFALSEminorMicrosoft_English language (Australia)_21.4.52563.52939.app21.4.52563.52939
fe2381dc-81ce-4d36-9107-6aae586a672021.4.52563.52939TRUEEnglish language (Canada)MicrosoftFALSEminorMicrosoft_English language (Canada)_21.4.52563.52939.app21.4.52563.52939
0c098979-eadd-452c-90b1-6fd183e9565121.4.52563.52939TRUEEnglish language (United Kingdom)MicrosoftFALSEminorMicrosoft_English language (United Kingdom)_21.4.52563.52939.app21.4.52563.52939
3721d519-67eb-43ee-b55b-8a85c87c292d21.4.52563.52939TRUEEnglish language (New Zealand)MicrosoftFALSEminorMicrosoft_English language (New Zealand)_21.4.52563.52939.app21.4.52563.52939
44a6a6d5-4478-4f1e-a94e-421407fc122c21.4.52563.52939TRUEEnglish language (United States)MicrosoftFALSEminorMicrosoft_English language (United States)_21.4.52563.52939.app21.4.52563.52939
aefe4506-6a2f-4ce4-8ba3-2c87dbc26f5321.4.52563.52939TRUESpanish language (Spain)MicrosoftFALSEminorMicrosoft_Spanish language (Spain)_21.4.52563.52939.app21.4.52563.52939
9e737fc0-589a-436f-8b2f-0f27da2d2afd21.4.52563.52939TRUESpanish language (Mexico)MicrosoftFALSEminorMicrosoft_Spanish language (Mexico)_21.4.52563.52939.app21.4.52563.52939
f8555f70-8cfe-46a2-b961-444c8af4cf4f21.4.52563.52939TRUEFinnish language (Finland)MicrosoftFALSEminorMicrosoft_Finnish language (Finland)_21.4.52563.52939.app21.4.52563.52939
cb8f8fd2-7704-470a-bc12-40ff71ee6a3021.4.52563.52939TRUEFrench language (Belgium)MicrosoftFALSEminorMicrosoft_French language (Belgium)_21.4.52563.52939.app21.4.52563.52939
5363109d-5605-4580-9cb7-5b577d00bbb221.4.52563.52939TRUEFrench language (Canada)MicrosoftFALSEminorMicrosoft_French language (Canada)_21.4.52563.52939.app21.4.52563.52939
865bb488-eec0-4d05-b196-258fd1ff836321.4.52563.52939TRUEFrench language (Switzerland)MicrosoftFALSEminorMicrosoft_French language (Switzerland)_21.4.52563.52939.app21.4.52563.52939
c75a45c6-4e83-46e1-b17b-48c6506c19f321.4.52563.52939TRUEFrench language (France)MicrosoftFALSEminorMicrosoft_French language (France)_21.4.52563.52939.app21.4.52563.52939
2ed02040-0300-4d64-b8c5-a48d09dddfc621.4.52563.52939TRUEIcelandic language (Iceland)MicrosoftFALSEminorMicrosoft_Icelandic language (Iceland)_21.4.52563.52939.app21.4.52563.52939
a5d61952-f432-4ee6-8686-e8aa5d3dedc021.4.52563.52939TRUEItalian language (Switzerland)MicrosoftFALSEminorMicrosoft_Italian language (Switzerland)_21.4.52563.52939.app21.4.52563.52939
51ba3799-d76c-4cf0-afd3-e2c2f6c0576b21.4.52563.52939TRUEItalian language (Italy)MicrosoftFALSEminorMicrosoft_Italian language (Italy)_21.4.52563.52939.app21.4.52563.52939
cc85911b-390d-42d5-b4bb-1ec519019a3021.4.52563.52939TRUENorwegian language (Norway)MicrosoftFALSEminorMicrosoft_Norwegian language (Norway)_21.4.52563.52939.app21.4.52563.52939
fbc91b81-1986-420f-9dd4-c41b381364ab21.4.52563.52939TRUEDutch language (Belgium)MicrosoftFALSEminorMicrosoft_Dutch language (Belgium)_21.4.52563.52939.app21.4.52563.52939
499ec319-ef73-463a-8d31-d66a58e2325a21.4.52563.52939TRUEDutch language (Netherlands)MicrosoftFALSEminorMicrosoft_Dutch language (Netherlands)_21.4.52563.52939.app21.4.52563.52939
80e80fa9-7100-4885-852c-ac6b053298dd21.4.52563.52939TRUERussian language (Russia)MicrosoftFALSEminorMicrosoft_Russian language (Russia)_21.4.52563.52939.app21.4.52563.52939
ae1f0b7f-1ae3-4ca1-aeba-adc431cc12f921.4.52563.52939TRUESwedish language (Sweden)MicrosoftFALSEminorMicrosoft_Swedish language (Sweden)_21.4.52563.52939.app21.4.52563.52939
b7174aae-753c-4e71-bacb-d973995dce5e21.4.52563.52939FALSE_Exclude_ReportLayoutsMicrosoftFALSEminorMicrosoft__Exclude_ReportLayouts_21.4.52563.52939.app21.4.52563.52939
5a0b41e9-7a42-4123-d521-2265186cfb3121.4.52563.52939TRUEContoso Coffee Demo DatasetMicrosoftFALSEminorMicrosoft_Contoso Coffee Demo Dataset_21.4.52563.52939.app21.4.52563.52939
70912191-3c4c-49fc-a1de-bc6ea1ac9da621.4.52563.52939FALSEIntrastat CoreMicrosoftFALSEminorMicrosoft_Intrastat Core_21.4.52563.52939.app21.4.52563.52939
e2ae191d-8829-44c3-a373-3749a2742d4d21.4.52563.52939FALSEService DeclarationMicrosoftFALSEminorMicrosoft_Service Declaration_21.4.52563.52939.app21.4.52563.52939
672777d5-ab26-4369-b334-6f04256efffd21.4.52563.52939FALSE_Exclude_Onboarding SignalsMicrosoftFALSEminorMicrosoft__Exclude_Onboarding Signals_21.4.52563.52939.app21.4.52563.52939

END

Hope this will help.

Thanks for reading.

ZHU

コメント

Copied title and URL