Add Laborcode field to the workorder screen with custom java class

As you guys may know, I am a .NET developer and I have been experimenting with Java and trying to learn and write some Maximo custom java class implementations.  So here is my first hands on experience extending an existing class in order to add a laborcode field to the workorder screen.  Of course, you could just go into the database configuration and just add a new field and associate it with the labor object, but there is more to it than just adding a new field.  If you want that field to behave like other laborcode fields, such as the lookup dialog to show the right data, or making sure that the value entered into the field is validated against the existing laborcodes.  If you didn’t write this custom java class, the user could just enter any data they wanted and it wouldn’t be validated against the laborcodes and it would defeat the purpose of adding it in the first place.

I had to write this java class because one of my clients requested that they wanted to be able to put a laborcode value directly on the workorder screen, just like they were able to in Maximo 4.1.1, even though they could just add a record into the Work Plan tab of the workorder.  But now in Maximo 7, the lead or supervisor field is associated with the person table and not labor table.  And since their person ID’s are not that same as their labor code ID’s, I have come up with this simple solution.  This tutorial will walk you through adding a new field in the database configuration and setting it up to use the custom java class that we have written.  The java source is also provided here.

This text is available for purchase but you need to login or register first. Please Login here.
About Chon

I am a Senior Software Engineer at InterPro Solutions, LLC located in Wakefield, MA.

  • http://twitter.com/primozsev PRiMoZ

    You can also put Table domain on a field and then you can use lookup and other functionality. In table domain you can also specify validation where clause and a fileter clause for lookup.

  • Janhavi

    Hi chon,

    I am facing some problem to map object attributes with application control. Please go thru the details

    i have created one table laborjob thru database configuration application in maximo and i have added(designed) tab in asset application, when i map the control(text box) with table attribute its showing me error “INVALID BINDING”

    i have given service as ASSET to that table and class is custom class psdi.mbo.custom.CustomMboset.

    there is 11 attribute of table in which siteid and assetnum is same as object site and asset. so these attribute are got mapped easily but other independent attribute which i have created showing the invalid binding error

    what should be the relationship i should create in both table, i have set the child object as ASSET and where clause as assetnum=:assetnum and siteid=:siteid

    thanks
    janhavi

  • maximo_user

    I am new to customizations. Could you let me know the steps to create an ear file and redeploy. I am using v7.2. Thanks