Do this in a test environment first!
- Go to Application Designer
- Export Library.xml
- Find the dialog boxes you need to make Attachments work, such as id="addnewattachmentfile" (to add files), id="addnewattachmentwww" (to add URLs), and id="addfromlibrary" (to add Attachments from the Document Library). Copy these and paste them in an editor like Notepad++
- In these dialog boxes, remove: savemode="ONLOAD"
- In Application Designer, search for PR
- Open the design for PR, and export the XML
- Somewhere near the bottom of the file, where the rest of the dialog boxes are, paste in the edited dialog boxes you copied from Library.xml
I've done something like this for a clone of WOTRACK where I needed to make sure the Attachment happens BEFORE Save. The idea here is that when someone clicks the link to add an Attachment, Maximo looks for a dialog box that has the name of the event specified in the link's properties. It will look within the current XML file first, then if it doesn't find it, it will reach out to the System XML files like Library.xml. So you're going to make a copy that's local to PR.xml, and change its behavior. The
savemode="ONLOAD" property tells it to Save when the link is clicked. So remove that property and it won't execute a Save.
But, as I said, and as Nivin has pointed out, it needs the PRID in the DOCLINKS table, so test this in a test environment to make sure the links actually work correctly.------------------------------
Travis Herron
------------------------------
Original Message:
Sent: Wed November 24, 2021 03:02 AM
From: Venkatrao Yenuganti
Subject: PR Record should not be saved without an attachment

------------------------------
Venkatrao Yenuganti
------------------------------
#AssetandFacilitiesManagement
#Maximo