cancel
Showing results for 
Search instead for 
Did you mean: 

Sort Created On column in Results list CMListExt.htm

Former Member
0 Kudos
78

Hi,

When doing a Document Search in CRM, users would like to see the attachments sorted by created on date. I think the views involved here are CMList and CMListExt; however, I'm not sure how to go about sorting on this field. It looks to me like the sorting is already included in the htm code. Any suggestions appreciated as I have little experience with CRM.

Thanks,

John.

Accepted Solutions (1)

Accepted Solutions (1)

prasenjit_sharma
Active Contributor
0 Kudos

Hi,

You can use the DO_PREPARE_OUTPUT method of your controller class to sort the result set before display. You may be able to use the method 'SORT' at the collection wrapper of the context node in question.

Regards

Prasenjit

Answers (2)

Answers (2)

former_member534411
Participant
0 Kudos

Hi Everyone,

I have got INBOX view results based on some search critiria - is there any way to sort the view results based on 2 fields as standard view can be sorted based on only one field.

CL_BSP_WD_COLLECTION_WRAPPER (IF_BOL_BO_COL~SORT) & attribute of the IV_SORT_CALLBACK.

i woder Do you guys ever used to attribute. if yes please lemme the way.

Thanks

Poorna Poorna

nicolas_busson
Active Contributor
0 Kudos

Hi John,

Here is what you can do:

1) Enhance view CMList

2) Redefine method DO_PREPARE_OUTPUT of your controller

3) Implement following lines of code (or something similar) :


IF iv_first EQ abap_true.
  CALL METHOD me->typed_context->documents->collection_wrapper->sort
      EXPORTING
        iv_attr_name     = 'CREATED_AT'
        iv_sort_order    = 'D'
        iv_stable        = abap_false
        iv_sort_callback = me.
ENDIF.
me->typed_context->DOCUMENTS->build_table( ).

Kind regards,

Nicolas Busson.

Former Member
0 Kudos

Thanks Nicolas,

Do you have steps required to enhance view CMList? I'm very new to CRM.

John.

nicolas_busson
Active Contributor
0 Kudos

Go through steps 1 to 5 of the following blog:

/people/subhasis.panigrahy2/blog/2009/05/20/crm-2007--enhancing-views--part-iii

Nicolas.

Former Member
0 Kudos

Thanks again Nicolas,

I should have mentioned I'm using CRM 5.0...do you have steps for CRM 5.0?

Thanks,

John.

nicolas_busson
Active Contributor
0 Kudos

"CRM Webclient UI" forum is focused on the webclient UI framework of CRM5.2, CRM6.0 and CRM7.0.

So I suggest you post your question in the PCUI or Interaction Center forum (depending on your scenario).

Kind regards,

Nicolas Busson.

stephenjohannes
Active Contributor
0 Kudos

Please let us know whether you are using the PCUI or Interaction Center on CRM 5.0 and I will move this thread to the correct forum. Please do not repost your question.

Thank you,

Stephen

prasenjit_sharma
Active Contributor
0 Kudos

Hi,

For 5.0 you can actually update the BSP Page CMListExt.htm of your Z-CRM_IC BSP Application.

Just mention the field name in the SORT column.

Regards

Prasenjit

Former Member
0 Kudos

Hi ,

I'm using IC CRM 5.0 ...thanks,

John.

nicolas_busson
Active Contributor
0 Kudos

Then do not forget to have a look at this excellent thread:

Where you will find how to enhance Web IC views in CRM5.0:

[IC WebClient Consultant Cookbook for CRM 2005|https://websmp107.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000647973&_SCENARIO=01100035870000000112&_OBJECT=011000358700003057372006E]

Regards,

Nicolas.