Skip to main content
Post a question

Notifications

Announcements

No record found.

Small query to view Nav extension objects

Community Member Profile Picture Community Member Microsoft Employee

Everytime I published a new extension to database I wanted to see my new objects in "old-school" object designer to control which ID aren't occupied and can be used.

 

So today I decided to visualize these objects together with "original" objects and made a simple query. Please don't judge me strictly for my T-SQL :)

 

select [Extension Name],Publisher,[Version Major],[Object Type],ID,Name,[SubType] from (
select [Type] as T,'' as [Extension Name],'' as Publisher,'' as [Version Major],case [Type]
when 1 then 'table'
when 3 then 'report'
when 5 then 'codeunit'
when 6 then 'xmlport'
when 7 then 'menu'
when 8 then 'page'
when 9 then 'query'
when 14 then 'page extension'
when 15 then 'table extension' end as [Object Type],[ID],[Name],'' as [SubType] from [Object]
where Type<>0
union all
select [Object Type], app.[Name] as [Extension Name],Publisher,[Version Major],
case [Object Type]
when 1 then 'table'
when 3 then 'report'
when 5 then 'codeunit'
when 6 then 'xmlport'
when 7 then 'menu'
when 8 then 'page'
when 9 then 'query'
when 14 then 'page extension'
when 15 then 'table extension' end as [Object Type],[Object ID],[Object Name],[Object Subtype]
from [NAV App Object Metadata] om
left join [NAV App] app on app.[Package ID]=[App Package ID]
) xxx
order by T,ID

 

So the part of result of the query from test database is below

 

2158.query.jpg

 

It's certainly isn't universal tool. You should control what you wrote in app.json  

"idRange": {
"from": 50100,
"to": 50149
 
But in some cases I think It can be useful 
 

Comments

*This post is locked for comments