Skip to Content
0
Former Member
Feb 27, 2011 at 07:57 PM

Can not update an assignment block with on_new_focus

103 Views

Hello Experts,

I have the following problem. I created a new component which is similar to the component BP_BPBT to create activities for Business Agreements. In the overview page of the business agreement in WebUI, I have now the assigment blocks "Plannend activities" and "Interaction History".

When I create a new activity in the assigment block "planned activities" with the new button and save the activity with the buttons "SAVE" or "SAVE AND BACK". The new created actity is shown, depending on the "Active Status" , in one of the assignment blocks "Plannend activities" and "Interaction History". When I create an another activity in the same way, the new actiity is not shown in the assignment blocks. But when I reload the page again, I can see the new created activity.

During debugging, I see, that the first creating activity is in the collection in the method ON_NEW_FOCUS. When I create an another activity, the collection is not updated. Here is my coding:

* get collection of dependent nodes
  TRY.
      entity ?= focus_bo.  "BuAg Entity  
    CATCH cx_sy_move_cast_error.
      RETURN.
  ENDTRY.
  TRY.

  lr_entity = entity->get_related_entity( iv_relation_name = 'BuAgBuPaRel' ).

     lv_collection = lr_entity->get_related_entities(
         iv_relation_name = 'BuilInteractionHistoryRel'
*  D022159: Performance optimization
         iv_mode          = lv_mode ).

Can anyone explain me, why the activities (after the first one) are not in my collection.

Can anyone help me to fix this problem?

Kind Regards,

John H.