April 5, 2011

How to enable doclinks in a custom Maximo application

Here is an example of how to add the attachment capability to the organizations (MULTISITE) application.
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]' and ownerid=:[OBJECT_ID]
The
[MAIN_APP_OBJECT] can be retrieved in the Application Designer and the [OBJECT_ID] can be determined through the 'Indexes' tab in the Database Configuration looking for the unique/internal index.
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.

April 4, 2011

How to schedule Preventive Maintenance at the first working day of each month

During one of my consultancies I was asked how it is possible to remind one person to produce a report each month. They want to generate the PM application to generate a work order for the first working day of each month.
This can be achieved with a tricky use of a 'Time Based Frequency' and 'Seasonal Dates' settings.
First you need to create a PM entry and set a frequency that is more than one week and less than one month. 20 days is a good choice. Leave the 'Use Last WO's Start Information to Calculate Next Due Frequency' option checked.


Then you need to configure the 'Seasonal Dates' unchecking the Sunday and Saturday options. Finally add twelve rows in the 'Active Dates' section specifying the first three days of each month. See the following screenshot.



Set the 'Estimated Next Due Date', activate the PM and generate the work orders for 360 days using the action menu. Go in the Work Order Tracking application and you will see your workorders.