Getting Application ID from Espace ID

Getting Application ID from Espace ID

  

Good day.

Does anyone know if there is a way to get the Application Id from a espace Id? I was mostly expecting to find a ApplicationId on espace entity on System, but that dosen't seens to be the case...

Solution

Nevermind, looking at Discovery i found out this path through the entities:

Espace > Module > App_Definition_Module > Application

Still not sure if this is the best solution...

Solution

You could try the following:

select ossys_module.espace_id, ossys_app_definition_module.application_id, ossys_app_definition_module.module_id from ossys_module
inner join ossys_app_definition_module on ossys_module.id = ossys_app_definition_module.application_id
inner join ossys_application on ossys_app_definition_module.application_id = ossys_application.id
where ossys_application.id = 42 (some Application Id)
and ossys_module.module_kind_Id = 1 (for eSpaces)

Like this, you will also get the Module Id.