OK, will try to find time to check this, how it works, and what can be done.
Original Message:
Sent: Tue July 01, 2025 08:38 AM
From: Brandon Fisher
Subject: Opening the Attached Docs "Add New File" dialog from an automation scripts
I did see that - and what Steven wrote is likely the issue (it doesn't work at an mbo level). I did try that other option I think you're referring to with the referenced context. It didn't work, either - in Steven's scenario, he did it from an object launch point so I'm guessing it is something that doesn't work from an attribute launch point.
------------------------------
Brandon Fisher
Original Message:
Sent: Tue July 01, 2025 08:31 AM
From: Juris Flugins
Subject: Opening the Attached Docs "Add New File" dialog from an automation scripts
Haven't tested, but there should be context provided in script, es in this example
https://community.ibm.com/community/user/discussion/info-about-servicelaunchdialogstring-dialogid-new-in-7612
------------------------------
Juris Flugins
Expert IT Consultant
TROIA d.o.o
Jurmala
Original Message:
Sent: Tue July 01, 2025 08:19 AM
From: Brandon Fisher
Subject: Opening the Attached Docs "Add New File" dialog from an automation scripts
The script is just:
service.launchDialog("draddnewattachmentfile")
I've tested it on a simple attribute automation script so that it fires on the change of the worktype attribute on workorder.
------------------------------
Brandon Fisher
Original Message:
Sent: Tue July 01, 2025 01:38 AM
From: Juris Flugins
Subject: Opening the Attached Docs "Add New File" dialog from an automation scripts
Please provide script for that part.
Are getting context in that script?
------------------------------
Juris Flugins
Expert IT Consultant
TROIA d.o.o
Jurmala
Original Message:
Sent: Mon June 30, 2025 04:13 PM
From: Brandon Fisher
Subject: Opening the Attached Docs "Add New File" dialog from an automation scripts
I'm wanting to force users to add an attachment if one doesn't exist in a specific attachment folder when they go to complete a work order, so I'm trying to get the "Add New File" dialog (id draddnewattachmentfile) to pop up.
I've tried to invoke service.launchDialog("draddnewattachmentfile"), which launches the dialog ok.... just with invalid bindings. It seems to behave as if it's ignoring the DOCLINKS relationship since the "DESCRIPTION" attribute is the only component that doesn't have an invalid binding - it's grabbing that from WORKORDER. I wasn't sure if this was due to me initially firing it from the WOCHANGESTATUS object, but I've tried firing it from WORKORDER as well and get the same results. I then tried just sticking the event on a push button and throwing it on the work order - same results.
This obviously works fine if I go to it through the normal Attachments menu, but if I try to invoke the dialog through a script or the event from a push button, I get invalid bindings.
------------------------------
Brandon Fisher
------------------------------