Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9159

Re: populate obj type of BT through obj id

$
0
0

Hi Kiran,

 

   For BTQuery1O the result node would be BTOrder which has crm Guid. So if u need object u need to get from Children (Get_related_entity).

 

 

 

Bol Relation is BTOrderHeader then u ll get BTAdminH it has ObjectType,

 

 

Eg code :

  Data :  ls_parameter     TYPE crmt_name_value_pair,
     lt_parameter     TYPE crmt_name_value_pair_tab,

     lr_query_service type ref to cl_crm_bol_query_service,

     lr_result type ref to if_bol_entity_col,

     lr_children type ref to cl_crm_bol_entity.


     ls_parameter-name  = 'OBJECT_ID'.                   
     ls_parameter-value =   '1105201'.
     CHECK NOT ls_parameter-value IS INITIAL.
     APPEND ls_parameter TO lt_parameter.

*   run query / search for last interactions
     lr_query_service->set_query_parameters( lt_parameter ).

  

lr_result ?=  lr_query_service->Get_query_result ()

lr_entity ?=  lr_result->get_first( ).

lr_children = lr_entity->get_related_entity('BTOrderHeader').

lv_obj_type = lr_children->get_property_as_value (Iv_attr_name = 'OBJ_TYPE')

 

 

Thanks & Regards,

Arunpandi                                                  


Viewing all articles
Browse latest Browse all 9159

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>