on 04-26-2018 11:25 AM
Hi experts,
I need to access an activity data from an UI component. I have to implement some code in CRMCMP_EMAIL/MailSearchResultView but first, I need to have access to the current activity data in IC (BT125H_TASK UI Component). So here is the scenario: The operator confirm a BP, then search an activity (Navigation Bar--> Search activity), then goes in edit mode, after that click on Email Outbounding (Navigation Bar-->Email)...and here is where I need to intervene to implement my code and I need to access the current activity data which is in edit mode. I tried to use
lr_gdc ?= cl_crm_ui_data_context_srv=>get_instance( me )
but can't get any data regarding the current activity in IC. But if I repeat the same process with Service Request instead of activity (Navigation Bar--> Search Service Request), it gave perfectly the entity of current service request. what am I missing?
Does anyone know which of the following Global Custom Controller provides me the entity of the activities?
GLOBAL.CRM_IC/CategoryController”
GLOBAL.ICCMP_CM/CuCoCm”
GLOBAL.CRMCMP_BPIDENT/CuCoBuPa”
GLOBAL.ICCMP_BT_GLOBAL/CuCoBT”
GLOBAL.ICCMP_BT_GLOBAL/CuCoDeBT”
GLOBAL.ICCMP_FAXLETTER/CuCoFaxLetter”
GLOBAL.CRMCMP_IC_FRAME/CuCoHiddenView”
GLOBAL.ICCMP_IBASE/cucoibase”
GLOBAL.ICCMP_BT_GLOBAL/CuCoIRec”
GLOBAL.CRMCMP_CCS_EML/MailCuCo”
GLOBAL.ICCMP_BT_GLOBAL/CuCoProcess”
GLOBAL.ICCMP_PROD_GLOB/CucoProduct”
GLOBAL.ICCMP_GLOBAL/CuCoUI”
GLOBAL.ICCMP_EMP_SRCH/CuCoEmp”
GLOBAL.ICCMP_AUTO_VEHI/VEHICuco’
I also tried:
DATA: LV_CC TYPE REF TO CL_BT125H_T_TASKDETAILSCU_IMPL.
LV_CC ?= GET_CUSTOM_CONTROLLER( 'GLOBAL.BT125H_TASK/TaskDetailsCuCo' ).
but the BSP application crashes. Any suggestion?
appreciate your time and attention in advance
I enhanced the view CRMCMP_EMAIL/MailSearchResultView, implement the EH_ONSELECT method. The codes inside this method will be:
CALL METHOD SUPER->EH_ONSELECT
EXPORTING
htmlb_event = htmlb_event
htmlb_event_ex = htmlb_event_ex
.
DATA: lr_gdc TYPE REF TO if_crm_ui_data_context,
lr_entity TYPE REF TO if_bol_bo_property_access.
TRY.
lr_gdc ?= cl_crm_ui_data_context_srv=>get_instance( iv_controller = me ).
CATCH cx_root.
RETURN.
ENDTRY.
TRY.
lr_entity ?= lr_gdc->get_entity( name = if_iccmp_global_data_cont_con=>GDC_CURRENTCONTEXT ).
CATCH cx_root.
RETURN.
ENDTRY.
---------------------------
What I did is the same as yours:
I compared the entries in gt_entity, there are 4 entries with names:
CURRENTCUSTOMER, CURRENTIREC, CURRENTBT, CURRENTCONTEXT
I compared the GUID of them, the one for CURRENTCONTEXT is the activity I edited just now.
This CURRENTCONTEXT is set when click 'Edit' button on the activity view. From the callstack in attached picture we can know more. You can compare the callstack to check why the activity is not there.
Best Regards, Corrine
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.