BIP Reports – Query to get Position Profile Attachment details

While creating a position profile, there is an option to add the attachments. In order to get the various details of the attachment like name, UCM content ID etc, please use the below query:

select hpb.PROFILE_TYPE_ID,
       PROFILE_CODE,
       PROFILE_STATUS_CODE,
       PROFILE_USAGE_CODE,
       fad.CATEGORY_NAME ,
       fdt.file_name,
       fdt.dm_version_number document_id,
       fdt.dm_document_id UCM_file
  from fnd_attached_documents fad, HRT_PROFILES_B hpb, fnd_documents_tl fdt
 where ENTITY_NAME = 'HRT_PROFILES_B'
   and hpb.profile_id = fad.PK1_VALUE
   AND fad.document_id = fdt.document_id
   AND fdt.language = 'US'

In order to download the attchments from UCM, the user should have AttachmentsRead role attached. Please check the below post on how to create AttachmentsRead role:

https://fusionhcmconsulting.com/2021/03/security-role-to-view-document-of-record-attachments-on-ucm/