Is there an entry point or built in function to view an attachment?

SOLVED

On X3 V12, I want to add a button or menu item that opens an attachment on an object without opening the attachments popup window. I know all of the parameters of the attachment and want to know what the code is for viewing the attachment. I see GOBJTXT is handling the click event on the icon... can I call an entry point in GOBJTXT to display the attachment?

Parents
  • +1
    verified answer

    I added a menu button to a grid in X3 to view an attachment.  Below is my code:

    The [M]YFILNAM(nolign-1) is the file name of the attachment, which is the full path for the file to view.

    Local Char PARMSK(250)(1..20) , SAVACT(20)
    SAVACT = GACTION : GACTION = "ASYRVISU"
    PARMSK(1) = [M]YFILNAM(nolign-1)
    VALEUR = [M]YFILNAM(nolign-1)
    Call TRAITE_CHAR(VALEUR,PARMSK,"","ASYRVISU","",1,"") From GTRAITE
    GACTION = SAVACT

Reply
  • +1
    verified answer

    I added a menu button to a grid in X3 to view an attachment.  Below is my code:

    The [M]YFILNAM(nolign-1) is the file name of the attachment, which is the full path for the file to view.

    Local Char PARMSK(250)(1..20) , SAVACT(20)
    SAVACT = GACTION : GACTION = "ASYRVISU"
    PARMSK(1) = [M]YFILNAM(nolign-1)
    VALEUR = [M]YFILNAM(nolign-1)
    Call TRAITE_CHAR(VALEUR,PARMSK,"","ASYRVISU","",1,"") From GTRAITE
    GACTION = SAVACT

Children