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.
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/
3. All app info of the Microsoft First Party Apps on the current version (BC 21.4).
id | initialVersion | publishOnly | name | publisher | blockUninstall | allowedUpdates | path | version |
63ca2fa4-4f03-4f2b-a480-172fef340d3f | 21.4.52563.52939 | FALSE | System Application | Microsoft | TRUE | hotfix | Microsoft_System Application_21.4.52563.52939.app | 21.4.52563.52939 |
437dbf0e-84ff-417a-965d-ed2bb9650972 | 21.4.52563.52939 | FALSE | Base Application | Microsoft | TRUE | hotfix | Microsoft_Base Application_21.4.52563.52939.app | 21.4.52563.52939 |
c1335042-3002-4257-bf8a-75c898ccb1b8 | 21.4.52563.52939 | FALSE | Application | Microsoft | TRUE | hotfix | Microsoft_Application_21.4.52563.52939.app | 21.4.52563.52939 |
40860557-a18d-42ad-aecb-22b7dd80dc80 | 21.4.52563.52939 | TRUE | Permissions Mock | Microsoft | FALSE | minor | Microsoft_Permissions Mock_21.4.52563.52939.app | 21.4.52563.52939 |
e7320ebb-08b3-4406-b1ec-b4927d3e280b | 21.4.52563.52939 | TRUE | Any | Microsoft | FALSE | minor | Microsoft_Any_21.4.52563.52939.app | 21.4.52563.52939 |
dd0be2ea-f733-4d65-bb34-a28f4624fb14 | 21.4.52563.52939 | TRUE | Library Assert | Microsoft | FALSE | minor | Microsoft_Library Assert_21.4.52563.52939.app | 21.4.52563.52939 |
5095f467-0a01-4b99-99d1-9ff1237d286f | 21.4.52563.52939 | TRUE | Library Variable Storage | Microsoft | FALSE | minor | Microsoft_Library Variable Storage_21.4.52563.52939.app | 21.4.52563.52939 |
23de40a6-dfe8-4f80-80db-d70f83ce8caf | 21.4.52563.52939 | TRUE | Test Runner | Microsoft | FALSE | minor | Microsoft_Test Runner_21.4.52563.52939.app | 21.4.52563.52939 |
75f1590f-55c5-4501-ae63-bada5534e852 | 21.4.52563.52939 | TRUE | Performance Toolkit | Microsoft | FALSE | minor | Microsoft_Performance Toolkit_21.4.52563.52939.app | 21.4.52563.52939 |
063b3ac9-c464-4899-96e0-70d5425854e4 | 21.4.52563.52939 | FALSE | _Exclude_AnonymizedDataSharing_ | Microsoft | FALSE | minor | Microsoft__Exclude_AnonymizedDataSharing__21.4.52563.52939.app | 21.4.52563.52939 |
8afe7b40-8c87-4beb-ada0-451d1761bf95 | 21.4.52563.52939 | FALSE | _Exclude_APIV1_ | Microsoft | FALSE | minor | Microsoft__Exclude_APIV1__21.4.52563.52939.app | 21.4.52563.52939 |
10cb69d9-bc8a-4d27-970a-9e110e9db2a5 | 21.4.52563.52939 | FALSE | _Exclude_APIV2_ | Microsoft | FALSE | minor | Microsoft__Exclude_APIV2__21.4.52563.52939.app | 21.4.52563.52939 |
5f92e0d5-a60e-435f-ae85-71ec28dd3e41 | 21.4.52563.52939 | FALSE | _Exclude_PlanConfiguration_ | Microsoft | FALSE | minor | Microsoft__Exclude_PlanConfiguration__21.4.52563.52939.app | 21.4.52563.52939 |
8b3609cf-3947-44c3-9f20-ce6edc6da33f | 21.4.52563.52939 | FALSE | _Exclude_ClientAddIns_ | Microsoft | FALSE | minor | Microsoft__Exclude_ClientAddIns__21.4.52563.52939.app | 21.4.52563.52939 |
c526b3e9-b8ca-4683-81ba-fcd5f6b1472a | 21.4.52563.52939 | FALSE | Sales and Inventory Forecast | Microsoft | FALSE | minor | Microsoft_Sales and Inventory Forecast_21.4.52563.52939.app | 21.4.52563.52939 |
2a89f298-7ffd-44a5-a7ce-e08dac98abce | 21.4.52563.52939 | FALSE | Essential Business Headlines | Microsoft | FALSE | minor | Microsoft_Essential Business Headlines_21.4.52563.52939.app | 21.4.52563.52939 |
3d5b2137-efeb-4014-8489-41d37f8fd4c3 | 21.4.52563.52939 | FALSE | Late Payment Prediction | Microsoft | FALSE | minor | Microsoft_Late Payment Prediction_21.4.52563.52939.app | 21.4.52563.52939 |
ce917438-506c-4724-9b01-13c1b860e851 | 21.4.52563.52939 | TRUE | Microsoft Pay Payments | Microsoft | FALSE | minor | Microsoft_Microsoft Pay Payments_21.4.52563.52939.app | 21.4.52563.52939 |
c512d720-63b9-4b26-b062-a0c09b4ed322 | 21.4.52563.52939 | FALSE | Company Hub | Microsoft | FALSE | minor | Microsoft_Company Hub_21.4.52563.52939.app | 21.4.52563.52939 |
ec255f57-31d0-4ca2-b751-f2fa7c745abb | 21.4.52563.52939 | FALSE | Shopify Connector | Microsoft | FALSE | minor | Microsoft_Shopify Connector_21.4.52563.52939.app | 21.4.52563.52939 |
7819d79d-feea-4f09-bbed-5bbaca4bf323 | 21.4.52563.52939 | FALSE | Data Archive | Microsoft | FALSE | minor | Microsoft_Data Archive_21.4.52563.52939.app | 21.4.52563.52939 |
ac14293f-1eb7-4a7b-9936-b280da31970b | 21.4.52563.52939 | FALSE | Data Search | Microsoft | FALSE | minor | Microsoft_Data Search_21.4.52563.52939.app | 21.4.52563.52939 |
7961e9dc-a8e5-49b1-839b-3a78803a4cb8 | 21.4.52563.52939 | FALSE | Troubleshoot FA Ledger Entries | Microsoft | FALSE | minor | Microsoft_Troubleshoot FA Ledger Entries_21.4.52563.52939.app | 21.4.52563.52939 |
d09fa965-9a2a-424d-b704-69f3b54ed0ce | 21.4.52563.52939 | FALSE | Payment Links to PayPal | Microsoft | FALSE | minor | Microsoft_Payment Links to PayPal_21.4.52563.52939.app | 21.4.52563.52939 |
e86e9234-8b95-459d-a9ba-4d901208ca38 | 21.4.52563.52939 | FALSE | _Exclude_Microsoft Dynamics 365 – SmartList | Microsoft | FALSE | minor | Microsoft__Exclude_Microsoft Dynamics 365 – SmartList_21.4.52563.52939.app | 21.4.52563.52939 |
fbb56a54-4f3b-4d2f-9330-ed8921ec4ec7 | 21.4.52563.52939 | FALSE | _Exclude_SyncBaseApp_ | Microsoft | FALSE | minor | Microsoft__Exclude_SyncBaseApp__21.4.52563.52939.app | 21.4.52563.52939 |
a53a4bb0-aa53-8ff8-77d6-fe3388db0eb8 | 21.4.52563.52939 | FALSE | Recommended Apps | Microsoft | FALSE | minor | Microsoft_Recommended Apps_21.4.52563.52939.app | 21.4.52563.52939 |
16c26bda-5f9c-4a77-a17e-4835f06062c0 | 21.4.52563.52939 | FALSE | _Exclude_Connectivity Apps | Microsoft | FALSE | minor | Microsoft__Exclude_Connectivity Apps_21.4.52563.52939.app | 21.4.52563.52939 |
e97bbbc7-16b6-470b-9428-376baa778970 | 21.4.52563.52939 | FALSE | Send remittance advice by email | Microsoft | FALSE | minor | Microsoft_Send remittance advice by email_21.4.52563.52939.app | 21.4.52563.52939 |
c50a4bf0-db51-4ad2-88d5-fe2287da0eb8 | 21.4.52563.52939 | FALSE | VAT Group Management | Microsoft | FALSE | minor | Microsoft_VAT Group Management_21.4.52563.52939.app | 21.4.52563.52939 |
e6328152-bb29-4664-9dae-3bc7eaae1fd8 | 21.4.52563.52939 | FALSE | Email – Outlook REST API | Microsoft | FALSE | minor | Microsoft_Email – Outlook REST API_21.4.52563.52939.app | 21.4.52563.52939 |
aceb66c8-472e-437c-81d3-27e6c07d0f14 | 21.4.52563.52939 | FALSE | Email – Microsoft 365 Connector | Microsoft | FALSE | minor | Microsoft_Email – Microsoft 365 Connector_21.4.52563.52939.app | 21.4.52563.52939 |
08d69832-9231-429e-be2c-8bab2c96905b | 21.4.52563.52939 | FALSE | Email – Current User Connector | Microsoft | FALSE | minor | Microsoft_Email – Current User Connector_21.4.52563.52939.app | 21.4.52563.52939 |
8fc50dfb-d338-4fd9-9499-5e44cc8cbf50 | 21.4.52563.52939 | FALSE | Email – SMTP API | Microsoft | FALSE | minor | Microsoft_Email – SMTP API_21.4.52563.52939.app | 21.4.52563.52939 |
68e13fa3-217a-4be0-9141-99e5bf0ca818 | 21.4.52563.52939 | FALSE | Email – SMTP Connector | Microsoft | FALSE | minor | Microsoft_Email – SMTP Connector_21.4.52563.52939.app | 21.4.52563.52939 |
114e4e19-182b-42e2-b5a9-91d8b8ee8ce1 | 21.4.52563.52939 | FALSE | _Exclude_Email Logging Using Graph API | Microsoft | FALSE | minor | Microsoft__Exclude_Email Logging Using Graph API_21.4.52563.52939.app | 21.4.52563.52939 |
7a129d06-5fd6-4fb6-b82b-0bf539c779d0 | 21.4.52563.52939 | FALSE | _Exclude_Bank Deposits | Microsoft | FALSE | minor | Microsoft__Exclude_Bank Deposits_21.4.52563.52939.app | 21.4.52563.52939 |
a2cc2ef8-949f-43d4-45b8-10bd6f8bc62c | 21.4.52563.52939 | FALSE | API Reports – Finance | Microsoft | FALSE | minor | Microsoft_API Reports – Finance_21.4.52563.52939.app | 21.4.52563.52939 |
8c972578-fe72-4aa5-ae51-cc5575fef2ea | 21.4.52563.52939 | FALSE | Send To Email Printer | Microsoft | FALSE | minor | Microsoft_Send To Email Printer_21.4.52563.52939.app | 21.4.52563.52939 |
2654d7e7-9afd-4947-9e02-6bb8f3e0cd04 | 21.4.52563.52939 | FALSE | Universal Print Integration | Microsoft | FALSE | minor | Microsoft_Universal Print Integration_21.4.52563.52939.app | 21.4.52563.52939 |
79b1a79a-2f66-4736-bc1b-8abb3537eb51 | 21.4.52563.52939 | FALSE | Simplified Bank Statement Import | Microsoft | FALSE | minor | Microsoft_Simplified Bank Statement Import_21.4.52563.52939.app | 21.4.52563.52939 |
58623bfa-0559-4bc2-ae1c-0979c29fd9e0 | 21.4.52563.52939 | FALSE | Intelligent Cloud Base | Microsoft | FALSE | minor | Microsoft_Intelligent Cloud Base_21.4.52563.52939.app | 21.4.52563.52939 |
57623bfa-0559-4bc2-ae1c-0979c29fc8d1 | 21.4.52563.52939 | FALSE | Business Central Cloud Migration API | Microsoft | FALSE | minor | Microsoft_Business Central Cloud Migration API_21.4.52563.52939.app | 21.4.52563.52939 |
334ef79e-547e-4631-8ba1-7a7f18e14de6 | 21.4.52563.52939 | FALSE | Business Central Intelligent Cloud | Microsoft | FALSE | minor | Microsoft_Business Central Intelligent Cloud_21.4.52563.52939.app | 21.4.52563.52939 |
6992416f-3f39-4d3c-8242-3fff61350bea | 21.4.52563.52939 | FALSE | Business Central Cloud Migration – Previous Release | Microsoft | FALSE | minor | Microsoft_Business Central Cloud Migration – Previous Release_21.4.52563.52939.app | 21.4.52563.52939 |
6813edab-d08b-4d30-a119-11f984e06669 | 21.4.52563.52939 | TRUE | Czech language (Czechia) | Microsoft | FALSE | minor | Microsoft_Czech language (Czechia)_21.4.52563.52939.app | 21.4.52563.52939 |
bdbd8422-02d6-4b5f-9a35-948c5700a436 | 21.4.52563.52939 | TRUE | Danish language (Denmark) | Microsoft | FALSE | minor | Microsoft_Danish language (Denmark)_21.4.52563.52939.app | 21.4.52563.52939 |
3a66faf9-4111-4ec3-be7e-7ca33e9421a0 | 21.4.52563.52939 | TRUE | German language (Austria) | Microsoft | FALSE | minor | Microsoft_German language (Austria)_21.4.52563.52939.app | 21.4.52563.52939 |
4e7ce29d-c973-4e89-8230-5e13b26ce9fb | 21.4.52563.52939 | TRUE | German language (Switzerland) | Microsoft | FALSE | minor | Microsoft_German language (Switzerland)_21.4.52563.52939.app | 21.4.52563.52939 |
e2d4cb5e-9120-4a92-824d-2e1e5dc1a699 | 21.4.52563.52939 | TRUE | German language (Germany) | Microsoft | FALSE | minor | Microsoft_German language (Germany)_21.4.52563.52939.app | 21.4.52563.52939 |
1732e878-cee4-4787-9456-05f25f4118da | 21.4.52563.52939 | TRUE | English language (Australia) | Microsoft | FALSE | minor | Microsoft_English language (Australia)_21.4.52563.52939.app | 21.4.52563.52939 |
fe2381dc-81ce-4d36-9107-6aae586a6720 | 21.4.52563.52939 | TRUE | English language (Canada) | Microsoft | FALSE | minor | Microsoft_English language (Canada)_21.4.52563.52939.app | 21.4.52563.52939 |
0c098979-eadd-452c-90b1-6fd183e95651 | 21.4.52563.52939 | TRUE | English language (United Kingdom) | Microsoft | FALSE | minor | Microsoft_English language (United Kingdom)_21.4.52563.52939.app | 21.4.52563.52939 |
3721d519-67eb-43ee-b55b-8a85c87c292d | 21.4.52563.52939 | TRUE | English language (New Zealand) | Microsoft | FALSE | minor | Microsoft_English language (New Zealand)_21.4.52563.52939.app | 21.4.52563.52939 |
44a6a6d5-4478-4f1e-a94e-421407fc122c | 21.4.52563.52939 | TRUE | English language (United States) | Microsoft | FALSE | minor | Microsoft_English language (United States)_21.4.52563.52939.app | 21.4.52563.52939 |
aefe4506-6a2f-4ce4-8ba3-2c87dbc26f53 | 21.4.52563.52939 | TRUE | Spanish language (Spain) | Microsoft | FALSE | minor | Microsoft_Spanish language (Spain)_21.4.52563.52939.app | 21.4.52563.52939 |
9e737fc0-589a-436f-8b2f-0f27da2d2afd | 21.4.52563.52939 | TRUE | Spanish language (Mexico) | Microsoft | FALSE | minor | Microsoft_Spanish language (Mexico)_21.4.52563.52939.app | 21.4.52563.52939 |
f8555f70-8cfe-46a2-b961-444c8af4cf4f | 21.4.52563.52939 | TRUE | Finnish language (Finland) | Microsoft | FALSE | minor | Microsoft_Finnish language (Finland)_21.4.52563.52939.app | 21.4.52563.52939 |
cb8f8fd2-7704-470a-bc12-40ff71ee6a30 | 21.4.52563.52939 | TRUE | French language (Belgium) | Microsoft | FALSE | minor | Microsoft_French language (Belgium)_21.4.52563.52939.app | 21.4.52563.52939 |
5363109d-5605-4580-9cb7-5b577d00bbb2 | 21.4.52563.52939 | TRUE | French language (Canada) | Microsoft | FALSE | minor | Microsoft_French language (Canada)_21.4.52563.52939.app | 21.4.52563.52939 |
865bb488-eec0-4d05-b196-258fd1ff8363 | 21.4.52563.52939 | TRUE | French language (Switzerland) | Microsoft | FALSE | minor | Microsoft_French language (Switzerland)_21.4.52563.52939.app | 21.4.52563.52939 |
c75a45c6-4e83-46e1-b17b-48c6506c19f3 | 21.4.52563.52939 | TRUE | French language (France) | Microsoft | FALSE | minor | Microsoft_French language (France)_21.4.52563.52939.app | 21.4.52563.52939 |
2ed02040-0300-4d64-b8c5-a48d09dddfc6 | 21.4.52563.52939 | TRUE | Icelandic language (Iceland) | Microsoft | FALSE | minor | Microsoft_Icelandic language (Iceland)_21.4.52563.52939.app | 21.4.52563.52939 |
a5d61952-f432-4ee6-8686-e8aa5d3dedc0 | 21.4.52563.52939 | TRUE | Italian language (Switzerland) | Microsoft | FALSE | minor | Microsoft_Italian language (Switzerland)_21.4.52563.52939.app | 21.4.52563.52939 |
51ba3799-d76c-4cf0-afd3-e2c2f6c0576b | 21.4.52563.52939 | TRUE | Italian language (Italy) | Microsoft | FALSE | minor | Microsoft_Italian language (Italy)_21.4.52563.52939.app | 21.4.52563.52939 |
cc85911b-390d-42d5-b4bb-1ec519019a30 | 21.4.52563.52939 | TRUE | Norwegian language (Norway) | Microsoft | FALSE | minor | Microsoft_Norwegian language (Norway)_21.4.52563.52939.app | 21.4.52563.52939 |
fbc91b81-1986-420f-9dd4-c41b381364ab | 21.4.52563.52939 | TRUE | Dutch language (Belgium) | Microsoft | FALSE | minor | Microsoft_Dutch language (Belgium)_21.4.52563.52939.app | 21.4.52563.52939 |
499ec319-ef73-463a-8d31-d66a58e2325a | 21.4.52563.52939 | TRUE | Dutch language (Netherlands) | Microsoft | FALSE | minor | Microsoft_Dutch language (Netherlands)_21.4.52563.52939.app | 21.4.52563.52939 |
80e80fa9-7100-4885-852c-ac6b053298dd | 21.4.52563.52939 | TRUE | Russian language (Russia) | Microsoft | FALSE | minor | Microsoft_Russian language (Russia)_21.4.52563.52939.app | 21.4.52563.52939 |
ae1f0b7f-1ae3-4ca1-aeba-adc431cc12f9 | 21.4.52563.52939 | TRUE | Swedish language (Sweden) | Microsoft | FALSE | minor | Microsoft_Swedish language (Sweden)_21.4.52563.52939.app | 21.4.52563.52939 |
b7174aae-753c-4e71-bacb-d973995dce5e | 21.4.52563.52939 | FALSE | _Exclude_ReportLayouts | Microsoft | FALSE | minor | Microsoft__Exclude_ReportLayouts_21.4.52563.52939.app | 21.4.52563.52939 |
5a0b41e9-7a42-4123-d521-2265186cfb31 | 21.4.52563.52939 | TRUE | Contoso Coffee Demo Dataset | Microsoft | FALSE | minor | Microsoft_Contoso Coffee Demo Dataset_21.4.52563.52939.app | 21.4.52563.52939 |
70912191-3c4c-49fc-a1de-bc6ea1ac9da6 | 21.4.52563.52939 | FALSE | Intrastat Core | Microsoft | FALSE | minor | Microsoft_Intrastat Core_21.4.52563.52939.app | 21.4.52563.52939 |
e2ae191d-8829-44c3-a373-3749a2742d4d | 21.4.52563.52939 | FALSE | Service Declaration | Microsoft | FALSE | minor | Microsoft_Service Declaration_21.4.52563.52939.app | 21.4.52563.52939 |
672777d5-ab26-4369-b334-6f04256efffd | 21.4.52563.52939 | FALSE | _Exclude_Onboarding Signals | Microsoft | FALSE | minor | Microsoft__Exclude_Onboarding Signals_21.4.52563.52939.app | 21.4.52563.52939 |
END
Hope this will help.
Thanks for reading.
ZHU
コメント