Maximo Open Forum

 View Only
  • 1.  Setting up attachment for custom app that uses custom MBO

    Posted 08-25-2021 12:29
    Hello,

    I created a custom app that utilizes a custom MBO. I want to enable attached document feature to that custom app. Can anyone send me link or brief steps to accomplish that? 

    Thanks

    Pankaj
    #Administration

    ------------------------------
    Pankaj Bhide
    Berkeley National Laboratory
    ------------------------------


  • 2.  RE: Setting up attachment for custom app that uses custom MBO

    Posted 08-25-2021 16:37
    You need to get the records added to the APPDOCTYPE table. This is what associates the folders (DOCTYPES) that are available in the app. You can do this via SQL insert statements or you can expose the actions & dialog (the Attachment Library/Folders->Associate Folders).

    You also need to ensure you have a relationship called DOCLINKS on your custom object in Database Configuration. 

    From there you should be able to drag the attachment control to your application in application designer and it should work.

    ------------------------------
    Steven Shull
    IBM
    ------------------------------



  • 3.  RE: Setting up attachment for custom app that uses custom MBO

    Posted 08-31-2021 16:30
    Hello,

    Not sure what is missing.

    1) For this custom app, I associated the folder e.g. ATTACHED using Attachment Library/Folders->Associate folders. I see the entry is inserted into "appdoctype where app='LBLWRHSDTL'"

    2) Dragged attachment control to the app using app designer

    3) Created a relationship titled "DOCLINKS" where parent=<custom mbo> and child='DOCLINKS' and where=ownertable='LBL_WRHSFEEDDTL' and ownerid=:LBL_WRHSFEEDDTLID

    Now when I navigate to the record in the app, it shows the attachment control. However when I try add the file, it does not show the default folder name also when I try to add a file, it does not allow me naming the document and gives error:

    The browse function is not supported on this browser. In your browser, enable the property Include local directory path when uploading files to a server option under security settings.

    What could be missing?

    ------------------------------
    Pankaj Bhide
    Berkeley National Laboratory
    ------------------------------



  • 4.  RE: Setting up attachment for custom app that uses custom MBO

    Posted 08-31-2021 21:03
    I'm seeing an issue in 7.6.1.2 trying to add it to the Security Group application which I know I've done before. My error message is different but probably a similar cause. I'm assuming you have the system property mxe.doclink.usefileprompt enabled in your environment? This setting allows someone in Internet Explorer to "upload" a file without copying it to the server. 

    The error I get is it takes a few seconds and then I get "BMXAA4195E - A value is required for the URL / File Name field on the DOCLINKS object.". After that I'm actually able to upload a file and it works (shows up in the view attachments). But it seems this happens every time in my custom app and never in the out of the box applications.

    I even went and found a technote walking through this scenario to make sure I'm not crazy (https://www.ibm.com/support/pages/adding-attached-document-functionality) and it mentions doing the same thing on the main object (though you do need to switch to the desktop requisition version of attachments if adding to a table like PRLINE).

    I think it's a bug and I'd suggest opening a case with IBM. In the interim, if you add in the menutype & event like you would have to on a child object it seems to work just fine on the main object and avoids this issue. It shouldn't be required but would allow you to use it until the issue gets resolved. Sorry I just went from memory and didn't test this one because I was pretty confident it would just work.  


    ------------------------------
    Steven Shull
    IBM
    ------------------------------



  • 5.  RE: Setting up attachment for custom app that uses custom MBO

    Posted 09-01-2021 13:39
    Thanks Steve. I created the PMR. I am sure whether IBM will help as they may say this is related to the custom MBO and custom app. Let us see. 

    You indicated "add in the menutype & event like you would have to on a child object it seems to work just fine on the main object and avoids this issue. " 

    Can you please elaborate on this? Are you suggesting to create a dummy child MBO for the MBO on which this app is based on and what is "add menutype and event"?

    Sorry I did not understand. I would like to go with this suggestion as I am not sure whether IBM will help me or not. 


    ------------------------------
    Pankaj Bhide
    Berkeley National Laboratory
    ------------------------------



  • 6.  RE: Setting up attachment for custom app that uses custom MBO

    Posted 09-01-2021 14:01
    Sorry I wasn't very clear. In the technote I linked to (https://www.ibm.com/support/pages/adding-attached-document-functionality) it talks about modifying the attachment control to set the menutype and event. IE it should look like this:

    <attachments id="doclinks" menutype="drattachments" event="drviewattachments"/>

    The menutype & event should NOT be required for something that is the main object which is why you should just be able to drag the control on the screen. But this is required when you attach it to a one to many record (JOBTASK, POLINE, PRLINE, etc.) and seems to work just fine on the header record as well. 


    ------------------------------
    Steven Shull
    IBM
    ------------------------------



  • 7.  RE: Setting up attachment for custom app that uses custom MBO

    Posted 09-01-2021 14:16
    Marvelous Steve! It worked.  Once again thanks for your help

    I will keep posted what IBM tells me about it.

    ------------------------------
    Pankaj Bhide
    Berkeley National Laboratory
    ------------------------------