Business Central 2023 wave 2 (BC23): Added ID property on CompanyProperty to retrieve the company ID (CompanyProperty.ID)

Dynamics 365 Business Central

Hi, Readers.
The public preview for Dynamics 365 Business Central 2023 release wave 2 (BC23) is available. Learn more: Link.

I will continue to test and share some new features that I hope will be helpful.

In this post, I would like to talk about how to retrieve the company ID. This is not yet documented in the Business Central 2023 release wave 2 (BC23) release plan. But it is mentioned in AL Language extension changelog Version 12.0

Added ID property on CompanyProperty to retrieve the company ID.

https://marketplace.visualstudio.com/items/ms-dynamics-smb.al/changelog

In Business Central, each company has an ID, which is usually used in APIs.
PS: Company Name, Company Display Name, and Company URL Name

In previous versions, if you needed to get the Company Id from the code, you needed to search for it in Company (2000000006) using Name.
For example,

In this wave, Microsoft added ID property on CompanyProperty to retrieve the company ID.

CompanyProperty Data Type: Provides language support for company properties.

Very simple.

Great. Give it a try!!!😁

PS: In previous versions

END

Hope this will help.

Thanks for reading.

ZHU

コメント

Copied title and URL