Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Using hwc.showAttachmentContents

Hello,

Can anyone please let me know how to use the hwc.showAttachmentContents function in SUP 2.2 SP4?

I have an attachment that I would like to automatically show when moving from the list view to the list details screen,

The list contains all the information about the attachment (MIME, FILENAME, BINARYdata).

What my app does is gets the information of the attachment when I click the menu button show attachment. It then returns the data in a list. I would like it to show the attachment when I go from the list view screen to the details screen.

The method I am using to do this is:

hwc.customBeforeShowScreen = function(screenToShow, screenToHide) {

          if (screenToShow == "AttachDetail"){

                         var form = document.forms[screenToShow + "Form"];

        if (form) {

          var mvc = getCurrentMessageValueCollection();

          var binary = mvc.getData("Attach_ATTACHMENT_attribKey");

          var mime = mvc.getData("Attach_ATTACHMENTMIMETYPE_attribKey");

          var file = mvc.getData("Attach_FILENAME_attribKey");

         

          hwc.showAttachmentContents(binary, mime, file);

        }

         

          }

    return true;

};

When I click on the list I get the error "Invalid Attachment Data". Can anyone help with this please?

Thank you

Jared

Tags:
Former Member
replied

Check this

var binary = mvc.getData("Attach_ATTACHMENT_attribKey").getValue();

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question