Quantcast
Channel: SCN: Message List - SAP CRM: Webclient UI - Framework
Viewing all articles
Browse latest Browse all 7775

Re: Delete ContactRel entities of Account and modify Account collection at runtime

$
0
0

Hello,

 

This is totally doable.

You can create your own collection and set it to the given context node.

 

Something like that :

 

*__ Creation of new collection
CREATE OBJECT lr_newcol
 TYPE
 cl_crm_bol_bo_col.
 TRY.
 lr_it = iv_col->get_iterator( ).
 IF lr_it IS BOUND.
 lr_entity ?= lr_it->get_first( ).
 WHILE lr_entity IS BOUND.
 *__ Here do some custom test for filtering
 IF "criteria is OK to add entity to collection".
 *__ Add entity to collection
 lr_newcol->add( lr_entity ).
 ENDIF.
 lr_entity ?= lr_it->get_next( ).
 ENDWHILE.
 ENDIF.
 CATCH cx_crm_genil_model_error.
 CATCH cx_sy_ref_is_initial.
 ENDTRY.
*__ Now set collection to context node
 me->typed_context->customers->set_collection( lr_newcol ).


Hope this helps,

Best regards,

Sylvain AGUETTAZ


Viewing all articles
Browse latest Browse all 7775

Trending Articles



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