Add the ‘attachment’ control to the MULTISITE application using the Application Designer.
Then add the DOCLINKS relationship to the ORGANIZATIONS object as shown in the following picture.
Please check the 'Where Clause' statement and modify it to match your application. The where clause must be: ownertable='[MAIN_APP_OBJECT]
The
Note that this database change does not require to run dbconfig.
The last step is to insert a row in the APPDOCTYPE table to tell Maximo that the application MULTISITE supports attachments.
For DB2 use this INSERT statement:
INSERT INTO MAXIMO.APPDOCTYPE (APP, DOCTYPE, APPDOCTYPEID) VALUES ('MULTISITE', 'Attachments', (NEXT VALUE FOR MAXIMO.APPDOCTYPESEQ)); COMMIT;
For Oracle use this INSERT statement:
INSERT INTO MAXIMO.APPDOCTYPE (APP, DOCTYPE, APPDOCTYPEID) VALUES ('MULTISITE', 'Attachments', (MAXIMO.APPDOCTYPESEQ.NEXTVAL)); COMMIT;
You can check the table content with the following query:
SELECT * FROM MAXIMO.APPDOCTYPE WHERE APP='MULTISITE';
Now you should be able to attach documents and pictures to your organization.
Thank you! Used this just now.
ReplyDeleteI was trying to add doclinks attachment to the asset application, but related to a custom object "Certification".. so I've added the attachment component, and added the DOCLINKS relationship to Certification object, and I've checked this query:
ReplyDeleteSELECT * FROM MAXIMO.APPDOCTYPE WHERE APP='ASSET' AND DOCTYPE='Attachments'; and it returns one row..
But I have one problem, which is when creating new attachment, in the Certification tab, the list of folders in which I'll choose one folder to save the attachment in is not enabled, or as it has no data, meanwhile the attachments is working well in the asset tab in the same application..
I'll be grateful for u help..
Hi... I am facing a similar issue...
DeleteDo you remember how you sorted out the problem
Thanks in advance
In my understanding you can only have one type of attachment for each application.
ReplyDeleteIf you will solve this problem please let me know...
If there are more than one folders you would like to add documents from the custom application, an entry needs to be made for each of the folder names into APPDOCTYPE table. This should enable the 'Select a folder' drop down.
ReplyDeleteBruno, Very nice article indeed!
ReplyDeleteI'd like to add a small piece of additional info which can come very useful to anyone who may want to add the Attachment functionality to a custom-made dialog, like the one in Self-Service!
Go to Application Designer and export the application XML and then in the XML locate the Attachment control you already added. You need to add the following to it:
event="drviewattachments" menutype="drattachments"
so at the end it should look something like this:
Note that the ID is auto-generated (Do not change it) and the label is completely up to you to change
Sorry the tag did not show , it should look like this (I just removed the tags)
ReplyDeleteOpeningXMLTag
attachments id="1462371408752" label="Attachmentzzz" event="drviewattachments" menutype="drattachments"
/ClosingXMLTag