Hi,
There is a 'Reason' field on Lead screen. This field is not availabe in the Lead Search Results. My requirement is to have this field in the lead search result.
Below is the F2 screenshot.
This is what I did,
I have added the field in the structure CRMST_QUERY_R_LEA_BTIL using appened structure and then added to the displayed fields.
Now I can see the field in the search results.
To get the data for this field, I am enhancing the GET_CONC_KEY method. (Getter method)
I am having hard time in finding the relationship. Below is my code;
DATA: current TYPEREFTO cl_crm_bol_entity,
lr_entity TYPEREFTO cl_crm_bol_entity,
lr_textset_col TYPEREFTO if_bol_bo_col,
lr_iterator TYPEREFTO if_bol_bo_col_iterator.
value = ''.
IF iterator ISBOUND.
current ?= iterator->get_current( ).
ELSE.
current ?= collection_wrapper->get_current( ).
ENDIF.
CHECK current ISBOUND.
lr_entity ?= current->get_related_entity( 'BTADVSLea' ).
CHECK lr_entity ISBOUND.
lr_entity = lr_entity->get_related_entity( 'BTOrderHeader' ).
CHECK lr_entity ISBOUND.
lr_entity = lr_entity->get_related_entity( 'BTQRLeadDoc' ). """"<<<<< The problem is here - I am missing something
CHECK lr_entity ISBOUND.
value = lr_entity->get_property_as_string( 'CONC_KEY' ).
Thanks,