Skip to Content
author's profile photo Former Member
Former Member

Delete attachment linked to activity in ICWEB

Hello

I have implemented the deltion of attachment using following code. the commands went sucessfull but it is not deleting attachment(which is linked to activity/interaction record)

lr_entity_col = lv_bo->get_related_entities( iv_relation_name = cl_crm_cm_genil_comp=>gc_rel_bo_document_ref ).

lv_bo = lr_entity_col->get_first( ).

lv_bo->delete( ).

lv_core->modify( ).

lv_transaction = lv_core->get_transaction( ).

lv_transaction->save( ).

lv_transaction->commit( ).

Does anybody implemented similar logic?

Regards,

Laxman

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jan 30, 2008 at 08:57 PM

    Where are the attachments stored?

    Raja T

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      I have added custom tab to store attach the files to Interaction recrod i.e business activity.

      I m using following way to add attachment

      • create document child

      lv_core = cl_crm_bol_core=>get_instance( ).

      lv_transaction = lv_core->begin_transaction( ).

      IF lv_bo->lock( ) = if_genil_boolean=>true.

      if lv_bo->is_changeable( ) = abap_true.

      TRY.

      lv_doc = lv_bo->create_related_entity(

      cl_crm_cm_genil_comp=>gc_rel_bo_document_ref ).

      CATCH cx_crm_genil_model_error.

      CATCH cx_crm_genil_duplicate_rel.

      ENDTRY.

      endif.

      regards,

      Laxman

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.