TableId by given table name.

In Dynamics 365 Finance & Operations, we get table id by using tableNum() method and on sql we get by using the system table SYSTABLEIDVIEW 

SYSTABLEIDVIEW is used to look up the mapping between a table name and its Table ID.


select * from SYSTABLEIDVIEW where Name = 'hcmworker'


👉 What it does:

  • Looks up the table hcmworker.

  • Returns metadata, including:

    • TableID → the unique integer ID assigned to hcmworker.

    • Name → table name.

    • Possibly additional system columns depending on SQL setup.

✅ Example output:



Table id by using x++:

int tableId = tableNum(hcmWorker);

str tableName = tableId2Name(tableId);




Comments

Popular posts from this blog

JSON-Based HTTP POST Request from X++ to Retrieve an Access Token

Calling an External API from D365FO Using X++ to Retrieve a Token

Restricting Date Selection in Dynamics 365 FO using X++