cancel
Showing results for 
Search instead for 
Did you mean: 

CRM web UI issue with Attachemnts query and dynamic query

Former Member
0 Kudos

Hi ,

I need to create new assignment block(AB) in accounts page. This AB should display Attachemnts related to account in project and acitvites .

I found query CMDocumentFinder and dynamic query CMAdvDocumentFinder in component set CM which suitable for my requiement .

I provide INSTID = ORER GUID 

TYPEID = BUS2000111

CATID = BO as input parameters .

I got error message "Enter at least one (more) search criterion for performance reasons" . same error is coming when i use the dynamic query.

when I provide CREATED_BY = userid , results are coming .

My intenstion here is get the attachement details by order guid only.

I found FM CRM_ICSS_GET_ATTACHMENTS to get the attachment details , but this FM does not have enough output fields which suits my requiement.

my output should to be , attachement name (not file name ) ,attachement type , created by , created at.

and Alink should provide to the attachement name ,when choose on link it should open the attahcement.

Please suggest

(1) how run the query/dynamic query.

(2) suggest tables /views/FM to full fill my requiremnt name , mainly attachement name etc.

Thanks and regards

Naveen

Accepted Solutions (1)

Accepted Solutions (1)

VishnAndr
Active Contributor
0 Kudos

Hello, Naveen.

I'd suggest to use CMBOLinkQuery query service instead. It works perfectly well with GUID (INSTID), Business Type (BUS... ; TYPEID) and BO (CATID). Then from resul collection get related entity and then use relation CMBODocumentRefRel to get all the information about an attachment.

Former Member
0 Kudos

Hello Andrei,

Thank you very much for your  help.

wonder ,  CMBOLinkQuery is working. May I know the reason why query CMDocumentFinder and dynamic query CMAdvDocumentFinder are not working .

Thanks and regards

Naveen

VishnAndr
Active Contributor
0 Kudos

Naveen,

actually I have no idea why others do not work.

Answers (1)

Answers (1)

juergenbaur
Active Participant
0 Kudos

Try this:

    ls_cmbo_prop-instid = <order_header-guid>.
  ls_cmbo_prop-typeid = 'BUS2000115'.
  ls_cmbo_prop-catid = 'BO'.
  TRY.
      lr_qs = cl_crm_bol_query_service=>get_instance( cl_crm_cm_genil_comp=>gc_query_bo_link ).
      lr_qs->set_properties( ls_cmbo_prop ).
      rr_cmbo_col = lr_qs->get_query_result( ).
    CATCH cx_crm_unsupported_object.
* do nothing here.
  ENDTRY.

br

Jürgen