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

Re: Read Context Node Value in CRM

$
0
0

Hi,


I have added below code and now I am getting the value of BP Relation Partner in new Value Context Node created.




CHECK gr_owner IS BOUND." get the current entity of other context node

   lr_entity ?= gr_owner->btpartneroemendcust->collection_wrapper->get_current( ).

   CHECK  lr_entity  IS BOUND.

   lv_text = lr_entity->get_property_as_string( 'PARTNER_NO' ).

 

   lr_dyn_query = cl_crm_bol_dquery_service=>get_instance( 'BuilHeaderAdvancedSearch' ).

 

   lr_dyn_query->add_selection_param( iv_attr_name = 'PARTNER'

                                   iv_sign = 'I'

                                   iv_option = 'EQ'

                                   iv_low = lv_text

                                   iv_high = space ).

 

   lr_bp_col = lr_dyn_query->get_query_result( ).

   lr_bp_entity = lr_bp_col->get_current( ).

   CHECK lr_bp_entity IS BOUND.

   lr_rel_col = lr_bp_entity->get_related_entities( iv_relation_name = 'BuilRelationshipRel' ).

   CHECK lr_rel_col IS BOUND.

   lr_iterator = lr_rel_col->get_iterator( ).

   CHECK lr_iterator IS BOUND.

   lr_bp = lr_iterator->find_by_property( iv_attr_name = 'RELATIONSHIPCATEGORY'

                                        iv_value = 'ZECUST' ).

 

   CHECK lr_bp IS BOUND.

   lr_bp_find ?= lr_bp.

   CHECK lr_bp_find IS BOUND.

   lr_bp_find = lr_rel_col->find( iv_entity = lr_bp_find ).

 

   value = lr_bp_find->get_property_as_string( 'PARTNER2' )


Viewing all articles
Browse latest Browse all 9090

Trending Articles



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