Documents Search - Delete Attached Documents

Hi,
I am trying to figure out a way to delete attached documents from CRM tickets. There are instances where the user is attaching the wrong document to an interaction record. There is currently no known way to delete this attachment. Is there a way to do this? We want to be able to delete attachment totally...not just archive.
We are using CRM 5.0
Thanks,
John.

Class CL_CRM_DOCUMENTS Static Method DELETE
BUSINESS_OBJECT-instid =   Business Object Number / CRM Transaction Number
BUSINESS_OBJECT-typeid = Business Object i.e BUS200126
BUSINESS_OBJECT-catid  = 'BO'.

Similar Messages

  • 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

    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

  • Outlook delete attachment files if use POP3

    Hi every body,
    I have a problem with outlook. I send a mail with attachment using java mail api. Anyone get the mail correctly (gmail, outlook, outlook express or thunderbird) via SMTP. But if outlook try to get the mail via POP3, it deletes attachment and show only other part of mail. Other clients dont do it include outlook express. I dont have any idea about this situation. Can any body help me?
    My mail code is here:
    Properties props = new Properties();
    props.put("mail.smtp.host", server);
    props.put("mail.smtp.port", String.valueOf(port));
    session = Session.getDefaultInstance(props, null);
    transport = session.getTransport("smtp");
         MimeMessage msg = new MimeMessage(session);
         msg.setSentDate(new Date());
         msg.setFrom(fromAddress);
         msg.setRecipients(Message.RecipientType.TO, toAddress);
         msg.setSubject(subject, "UTF-8");
         MimeBodyPart messageBodyPart = new MimeBodyPart();
         String htmlEncoded = TurkishLocaleHelper
                   .convertTrToUTF8(message);
         messageBodyPart.setText(htmlEncoded);
         messageBodyPart.setHeader("Content-Type",
                   "text/html;charset=UTF-8");
         messageBodyPart.setHeader("Content-Transfer-Encoding",
                   "quoted-printable");
         MimeMultipart multipart = new MimeMultipart(
                   "alternative");
         multipart.addBodyPart(messageBodyPart);
         if (mailItem.getAttachmentFileList() != null) {
              for (String fileName : mailItem.getAttachmentFileList()) {
                   BodyPart fileBodyPart = new MimeBodyPart();
                   DataSource source = new FileDataSource(fileName);
                   fileBodyPart.setDataHandler(new DataHandler(source));
                   fileBodyPart.setFileName(FileUtil.trimFilePath(fileName));
                   multipart.addBodyPart(fileBodyPart);
         if (mailItem.getAttachmentFileMap() != null) {
              Map<String, String> fileMap = mailItem.getAttachmentFileMap();
              Set<String> keySet = fileMap.keySet();
              for (String filePath : keySet) {
                   String fileName = fileMap.get(filePath);
                   BodyPart fileBodyPart = new MimeBodyPart();
                   DataSource source = new FileDataSource(filePath);
                   fileBodyPart.setDataHandler(new DataHandler(source));
                   fileBodyPart.setFileName(fileName);
                   multipart.addBodyPart(fileBodyPart);
         msg.setContent(multipart);
         msg.saveChanges();
    transport.sendMessage(msg, msg.getAllRecipients());Edited by: vistek on Apr 13, 2010 6:10 AM

    Yes i was wrong. I use SMTP to sent mail, and POP3 to read it. Mail is shown with attachment in gmail but it is shown only body in outlook. If i open socket and sent mail via socket it is worked.
    Now i search using this method with attachment. Does any body know that?
    Example code:
    import java.net.*;
    import java.io.*;
    public class SMTP {
      private String message;
      private String localMachine;
      private String senderName;
      private String recipient;
      private boolean valid_and_unsent = false;
      private BufferedReader in;
      private BufferedWriter out;
      // class constants
      public static final int SMTP_PORT = 25;
      private static final boolean logging = true;
      public SMTP() {
      public SMTP(String sender) {
        int indexOfAtSign = sender.indexOf('@');
        if (indexOfAtSign < 0) {
          throw new RuntimeException("Malformed sender address." +
            " Need full user@host format");
        this.senderName = sender.substring(0, indexOfAtSign);
        this.localMachine = sender.substring(indexOfAtSign + 1);
      public SMTP(String sender, String recipient, String message) {
        this(sender);
        setMessage(recipient, message);
      public void setMessage(String recipient, String message) {
        this.recipient = recipient;
        this.message = message;
        valid_and_unsent = true;
      public void send() throws IOException {
        if (!valid_and_unsent) {
          throw new RuntimeException("Attempt to send incomplete message," +
            " or send message twice");
        // if this message is legitimate, continue to extract
        // the remote machine name
        int indexOfAtSign = recipient.indexOf('@');
        if (indexOfAtSign < 0) {
          throw new RuntimeException("Malformed recipient address." +
            " Need full user@host format");
        String destinationMachine = recipient.substring(indexOfAtSign + 1);
        // attempt to make the connection, this might throw an exception
        Socket s = new Socket(destinationMachine, SMTP_PORT);
        in = new BufferedReader(
               new InputStreamReader(s.getInputStream(),"8859_1"));
        out = new BufferedWriter(
               new OutputStreamWriter(s.getOutputStream(),"8859_1"));
        String response;
        // discard signon message, introduce ourselves, and discard reply
        response = hear();
        say("HELO " + localMachine + "\n");
        response = hear();
        say("MAIL FROM: " + senderName + "\n");
        response = hear();
        say("RCPT TO: " + recipient + "\n");
        response = hear();
        say("DATA\n");
        response = hear();
        say(message + "\n.\n");
        response = hear();
        say("QUIT\n");
        // now close down the connection..
        s.close();
      private void say(String toSay) throws IOException {
        out.write(toSay);
        out.flush();
        if (logging) {
          System.out.println(toSay);
      private String hear() throws IOException {
        String inString = in.readLine();
        if ("23".indexOf(inString.charAt(0)) < 0) {
          throw new IOException("SMTP problem: " + inString);
        if (logging) {
          System.out.println(inString);
        return inString;
      public static void main(String args[]) throws Exception {
        BufferedReader in = new BufferedReader(
                                   new InputStreamReader(System.in));
        System.out.print("Your address: ");
        System.out.flush();
        String sender = in.readLine();
        System.out.print("Recipient address: ");
        System.out.flush();
        String recipient = in.readLine();
        String message = "";
        String part;
        System.out.println("Message, end with '.' by itself:");
        for (;;) {
          part = in.readLine();
          if ((part == null) || part.equals(".")) {
            break;
          message += part + "\n";
        SMTP mailer = new SMTP(sender, recipient, message);
        mailer.send();
    }

  • Delete Attachment in activity/interaction record 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
    Edited by: laxman on Jan 29, 2008 7:26 PM

    Hi Laxman,
          The code you have mentioned is fine.
         But the bug might exist in UI or BOL layer. Just to be sure that save is successful, I always use the below code. You may try the same.
      IF lv_transaction->check_save_needed( ) EQ abap_true.
        IF lv_transaction->save( ) = abap_true.
    Regards,
    Manas.

  • Outer join two tables with query search record attached to both tables

    When I create a query with two tables that have query search records attached with outer join, PS seems to do a natural join (cartesian). We are on PT8.48.
    Is there a workaround for this issue. I do not want to remove query search record on either of the tables.
    I am trying to create an Emergency contact report. I am using two tables PS_EMPLOYEES and PS_EMERGENCY_CNTCT. Here is the sql PeopleSoft query generated when I did Left outer Join.
    Query SQL:
    SELECT A.EMPLID, A.NAME, A.ADDRESS1, A.CITY, B.PRIMARY_CONTACT, B.ADDRESS1, B.CITY, B.STATE, B.POSTAL, B.RELATIONSHIP, A.DEPTID, A.JOBCODE, A.COMPANY, A.EMPL_TYPE
    FROM (PS_EMPLOYEES A LEFT OUTER JOIN PS_EMERGENCY_CNTCT B ON A.EMPLID = B.EMPLID ), PS_EMPLMT_SRCH_QRY A1, PS_PERS_SRCH_QRY B1
    WHERE A.EMPLID = A1.EMPLID
    AND A.EMPL_RCD = A1.EMPL_RCD
    AND A1.OPRID = 'SREESR'
    AND (B.EMPLID = B1.EMPLID OR B.EMPLID IS NULL )
    AND B1.OPRID = 'PS'
    Appreciate any help.

    I think there are fixes for this issue in later tools releases (Report ID 1544345000). I'm not sure about 8.48, but you might try the workaround documented in
    E-QR: Left Outer Joins with Security Records are returning unexpected results [ID 651252.1]
    on Oracle Support.
    Regards,
    Bob

  • Search Help attached to Data Element Question

    Hello! Hopefully this is a simple question to answer. I have looked online but cannot find exactly what I need.
    We currently have a search help attached to a data element. The search help is a custom search help. It does work so when you are in the screen it will show you options to pick from for that field. However, the field also allows for free-form text so the user can type in whatever and the screen will take it.
    Is there a way through the data element or search help to make it so the user is restricted to only what is in the search help and cannot just enter whatever?
    Thanks!!

    For restricting values You can use the at selection screen event  on that field.
    The search help field values will be there in a table .
    So what ever values are there in the table for that particular field , only those values will come in F4 also ..
    If it not maintained then issue an appropriate error message.
    at-selection screen on p_field.
    selct single  field from table into v_value.
    if sy-subrc <> 0.
    message ""Error message.
    Endif.
    Regards
    Mishra

  • Search index attached to document

    Hello. I have a collection of documents and I've created a catalog index (.pdx) of them. I've attached it to the main document from the Advanced tab of Document Properties. Everything works correctly so far. But when I try to move the folder of documents somewhere else, it still tries to find the attached index in the old location. How do you get it to look for the index at its relative location?
    Thanks in advance!

    Thank you for your reply. The index is moving with the other files. I'll give a little more information:
    The index is in a subfolder so it is getting moved with the rest of the files. But it continues to look in the original location where it was attached. What's interesting is the index itself works fine if I manuall select it during search, but when I open up the main document that it's attached to, Adobe Reader first displays the normal warning about your document is trying to access another file, and in that warning it has the old path. When you click OK to the warning it then says it can't find the file or it's corrupt. Of course, Adobe Acrobat doesn't display any warning, it just doesn't load the index.
    I'm using Acrobat 11 by the way.

  • Document scanning software that allows for custom search fields, attaching a thumbnail to the scanned document file, and works with any scanner?

    I am a professional photographer, with years of paper model releases. I would like to find a document scanning software that works with my exisiting flatbed scanner (Canon MP250) that I can customize the seach fields for (ie. name, agency, job, etc.) and also attach a thumbnail image to as a job reference. I would like the document to be searchable as well. I've looked at a few different document scanning software companies, but I haven't found one that allows me to attach a jpeg file to a scanned PDF. Does anyone know if software like this exists?

    You can't do better than to use VueScan:
    http://hamrick.com/

  • New Mail Message Won't Let Me Delete Attachment

    MacBook Pro (Retina, 15-inch, Mid 2014)
    10.10.2 (14C109)
    2.8 GHz Intel Core i7
    16 GB 1600 MHz DDR3
    500 GB SSD
    NVIDIA GeForce GT 750M 2048 MB
    Now some fun with emails.
    I composed a lengthy, carefully thought out, email to my CPA.  Then, without thinking, I added an PDF document as an attachment right in the middle of the text.  Can happen to anyone.
    I spent the next 20 minutes looking for a delete, CMD X, edit delete, or someway to remove the attachment.  No luck,  CMD Z did remove the CC: entry I just added, but not the attachment.  Can't drag it.
    So I spent another 10 minutes manipulating the text, ever so carefully, around the attachment, so the attachment would appear at the bottom on the email.
    So tell me.  Someone actually designed it to work this way?  Or maybe design is too harsh of a word.  It is a **** of a lot of work for something that should be so simple.

    Normally, you delete objects like that in mail by either positioning the cursor just after the attachment and pressing delete. Or by clicking once on it and pressing delete.

  • Delete Attachment - GOS

    Hi,
    I am deleting a GOS attachment using following code.
    data: i_borident  type borident,
           i_attsrv    type ref to cl_gos_document_service.
      i_objectd-objtype = 'YATTA'.
      i_objectd-logsys  = 'BO'.
      i_objectd-objkey  = inumber.
      select * from srgbtbrel                " Get GOS Link
               into table i_srgbtbrel
               where instid_a eq i_objectd-objkey
                 and typeid_a eq i_objectd-objtype
                 and catid_a eq i_objectd-logsys
                 and reltype eq 'ATTA'.
      if sy-subrc eq 0.
        create object i_attsrv.
        loop at i_srgbtbrel.
         i_borident-objkey =  i_srgbtbrel-instid_b.
         call method i_attsrv->delete_attachment
           exporting
    *         is_object     = i_objectd
             ip_attachment = i_borident-objkey.
         commit work.
        endloop.
      endif.
    I am getting proper binary key from table SRGBTBREL and passing to method DELETE_ATTACHMENT , and getting sy-subrc eq 0, then also attachment are showing in the document. But if you are going thru service object delete it has been deleting the attachment perfectly. What is the error in the code?
    Thanks
    aRs
    Message was edited by:
            aRs

    Hi.
    You are missing  SO_OBJECT_DELETE_IN_VB:
        data ls_folder_id type soodk.
        data ls_object_id type soodk.
        loop at i_srgbtbrel.
          i_borident-objkey =  i_srgbtbrel-instid_b.
          call method i_attsrv->delete_attachment
            exporting
    *         is_object     = i_objectd
             ip_attachment = i_borident-objkey.
          ls_folder_id = i_borident-objkey(17).
          ls_object_id = i_borident-objkey+17(17).
          call function 'SO_OBJECT_DELETE_IN_VB'
             in update task
             exporting
               folder_id = ls_folder_id
               object_id = ls_object_id.
        endloop.
        commit work and wait.
    At the end of cl_gos_document_service->delete_attachment, there is the line:
    call function 'GOS_ADD_KEY' exporting ip_objkey = ip_attachment.
    This function adds the deleted item to table gt_obj_to_delete.
    Later, the standard makes the call to SO_OBJECT_DELETE_IN_VB at include LSGOSITSF01, form  DELETE_OBJECTS using gt_obj_to_delete.
    Thanks.

  • Delete attachment from master data

    Hello,
    I need to delete .pdf file from attachment list of one material but there is no delete button. How could I delete it?
    Thank you

    click the right hand side of the icon( services for object), where you attached the document
    click the attachment list, select the attached file you want to delete and click delete icon in MM02
    or
    in  menu click system-->service for object in MM02
    Click the attachment list  icon next to the create icon select the attached file you want to delete and click delete icon
    Edited by: Sundaresan . E. V on Oct 2, 2010 9:14 PM

  • Search, Delete, Replace in Acrobat

    Hi,
    I am working with acrobat sdk. And I am developing a plug-in application.
    I want to search and replace user inputed text from PDF file.
    I search and replace using PDEText.
    But I got a problem in acrobat 8.0.
    1. File->Create PDF-> from blank page
    2. Type text into created document
    3. Save and close
    4. Open again
    I can search the typed text from this document.
    But I can't delete or replace text.
    This problem is only occurred in acrobat 8.
    Can anyone help me in this.
    Thanks

    Well, given that you really havent' provided much information about how your code works - it's pretty impossible to give you concrete information.
    If I had to GUESS - I would say that your PDFEdit content loop doesn't recurse into containers.
    Leonard

  • Delete Attachment link and the launchWebdynpro button in the UWL iview

    Hi,
    Can anyone help me in deleting or hiding the Attachment link and the launchWebdynpro button in the UWL iview. I dont want to do it in the iview properties which would affect all the tasks. Is there a way I can do it in the backend.\
    I appreciate the help.
    Thanks

    Hi Surjith,
    I have the same problem. How can I remove the link? After I called the mentioned function module, the attachment was removed (content) but in the UWL the file name is still there:
    From UWL:
    myFile.pdf by WF-BATCH (94 kb)
    myDeletedFile.pdf   <-- I removed this one with the function module
            CALL FUNCTION 'SAP_WAPI_ATTACHMENT_DELETE'
              EXPORTING
                workitem_id     = me->mv_wf_instance_id
                att_id          = ls_att_id
                delete_document = abap_true
              IMPORTING
                return_code     = lv_return.
    Could you please help me?
    Thanks,
    Thomas

  • Ifilter does not update Outlook to search for attachment content

    We are using Windows 7 and Outlook 2014, 64 bit
    I installed the iFilter application (9 for 64-bit platforms).
    I can now search attachment content (PDF) using Windows explorer.
    But, i cannot search attachment content in Outlook.
    I did follow instructions on Adobe website in installation and setting up the envirnoment variable.  NOt sure why it works in Windows explorer but not Outlook.
    Does it needs to be installed on the Exchange server as well?

    I would recommend starting over and migrate using your Time Capsule backup however DO NOT do it wirelessly, connect using an Ethernet Connection. If you upgraded to Lion from Snow Leopard then follow the instructions in this video, the kid is annoying but he knows what he's doing. Clean Install Of Snow Leopard video. Once you have installed and updated Snow Leopard then update using the 10.6.8 Update Combo, then log into the Mac App Store and re-install Lion and all it's updates. My guess this is an afternoons work.

  • Insert, search, delete performance overhead for different collections

    Hi,
    I am trying to create a table which compares performance overheads for different collections data structures. Does anyone want to help me out? I want to put a number from 1 - 9 in each of the question marks. 1 being very poor performance and 9 being very good performance (the reason I am doing this is that I had this question in a job interview test and I didn't pass it)
    anyone have any comments?
              Searching     Inserting     Deleting     
    ArrayList ? ? ?
    LinkedList ? ? ?
    TreeSet ? ? ?
    TreeMap ? ? ?
    HashMap ? ? ?
    HashSet ? ? ?
    Stack ? ? ?

    sorry the formatting has screwed up a bit when I posted it. It should have a list of the collection types and three columns (inserting, deleting, searching)

Maybe you are looking for

  • Change text colour in mail replies

    with Community Support help, I have found the 'colour' icon and how to get it on the toolbar when composing an email, but it's not an option in the 'reply' or 'reply all' mode  -  the choices to customize the toolbar there are far fewer and don't inc

  • Run time error while executing Rule- RSTRAM- 301

    Hi I am getting following error whilr  trying to laod data from flatfile. This process worked well till last month but now its failing with the below error.  Looks like  one columns which is foramatted to number without decimal when loaded is changin

  • Using tie-classed to change name of file uploaded through FTP protocol srvr

    Hi, I'm trying to use the extendedPreAddItem (or Post) method in an S_TieFolder class to automatically change the name of a file (an S_PublicObject) when it enters a Folder (via an FTP put upload). I'm fiddling around with code like this: AttributeVa

  • Trying to understand CF side-by-side installations (CF9 and CF11)

    I'm testing my upgrade from CF9 to CF11 on the same server.  Looks like my old CF9 installation was an enterprise, standard, IIS installation.  (if that makes sense to you)  My CF11 is an enterprise, production + secure, stand-alone installation.  It

  • Problem in displaying image on jsp page

    I want to display an image on jsp page.I copied the image the image in WebContent folder. I am able to see the image on the design pane when using the following code:- <img src="/image.gif" height="50" width="50"> but when i run it in the browser not