Skip to Content

CRM WebUI Table view: Jumping to a certain page

Hi Experts,

in CRM 7.0 (EHP1) I try to navigate after a search directly to a certain page/result entry of this result list.

E.g. my result list is 210 entries big, and 50 entries per page are displayed. I want to set the focus on entry no. 190, which in fact is displayed on the 4th page.

I would like to jump directly to page no.4 to set the focus on this entity.

Finding an entity within a collection and setting the focus I already did:

DATA: lv_index TYPE crmt_idx,

lr_marked_item TYPE REF TO if_bol_bo_property_access. *

lv_index = 190.

lr_marked_item ?= lr_context_iterator->get_by_index( iv_index = lv_index ).

IF lr_marked_item IS BOUND.

lr_context_iterator->find_bo( iv_bo = lr_marked_item ).

ENDIF.

BUT the page is not navigation automatically to the 4th page.

I already tried to analyze how stanard is doing it. In CL_THTMLB_CELLERATOR, RENDER_PAGER_ENTRY an piece of javascript is created and triggered as soon as the user clicks on one of the page numbers.

I already tried to trigger this script directly on my .htm-page (e.g. with an hidden button):

<% DATA: lv_script TYPE string.

DATA: lv_id TYPE string.

DATA: lv_button_id TYPE string.

DATA: lv_page TYPE i.

DATA: lv_new_visible_first_row TYPE i.

lv_id = controller->get_id('ItemTree').

lv_new_visible_first_row = ( ( 4 - 1 ) * 50 ) + 1.

* -> create script for press on pager

lv_script = lv_new_visible_first_row.

CONDENSE lv_script NO-GAPS.

CONCATENATE `thtmlbCCelleratorManager.doPage("` lv_id `","` lv_script `");` INTO lv_script. %>

<div style="display:none;">

<thtmlb:button id = "Navigate" onClick = "<%= lv_script %>" />

</div>

<% lv_button_id = controller->get_id('Navigate'). IF lv_script IS NOT INITIAL. %>

<script>

var button = document.getElementById("<%= lv_button_id %>";

button.click();

</script>

<% ENDIF. %>

But it is not working; no automatic navigation to the 4. page.

Can anyone help?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 23, 2016 at 02:28 PM

    Can you let us know what is your business requirement or why as to you wish to automatically navigate to a certain page.

    If you are trying to do Framework Level, then you would need to check all the applications as each application has its own way of navigating.

    However, if you have one specific application in mind, please let us know

    Add comment
    10|10000 characters needed characters exceeded

  • May 16, 2017 at 05:56 AM

    Hi Koch

    Have you found the solution? I have the same requirement now.

    thanks

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Varun

      Thanks for your reply. When we insert a new row, webui always adds an new row above the row which we selected. But customer want to insert the new row below the selected row. If selected row is the last row of current page, the new row will be added to the next page, so we hope webui can jump to the new page automatically.

      Best Regards.

      Yang