On almost every application Maximo provides a useful entry in the action menu to duplicate the selected record. When this action is performed, some of the field are intentionally wiped from Maximo. For example if you try to dupicate an Asset you will notice that Maximo resets some fields like ASSETNUM, LOCATION and SERIALNUM.
It may happen that you have added some custom fields on a Maximo object and you want to be cleaned when a record is duplicated. In such case, all you have to do is to override the skipCopyField(MboValueInfo mvi) method of the object’s data bean.
Extend the object’s class handler as described here and put the following method in the Mbo class.
@Override
protected boolean skipCopyField(MboValueInfo mvi) throws RemoteException, MXException
{
if(mvi.getName().equals("MYCUSTOMFIELD"))
return true;
return super.skipCopyField(mvi);
}
Add all the fields to be skipped during the object cloning in the if statement.
Simple and straightforward as long as you know it…
TPAE 7.5
The Database Configuration Application has been enhanced in Maximo 7.5.0.3 with a new object definition menu called ‘Exclude Attribute Data’. Here you can specify the attributes that you do not want included in your new object during the duplication process. You can also control what records are excluded using an SQL condition.
We have installed Maximo Asset Management 7.5.0.3 but do not see the 'Exclude Attribute Data' from Select Action in database configuration. What are we missing?
I trust this IBM resource: https://www.ibm.com/developerworks/mydeveloperworks/blogs/a9ba1efe-b731-4317-9724-a181d6155e3a/entry/wanna_have_more_control_over_attribute_duplication_on_your_maximo_business_objects_mbos7?lang=en
If it does not work you can open a PMR.
‘Exclude Attribute Data" not visible. Have IBM MAXIMO 7.5.0.3 installed but can not see the menu option in database configuration. What is missing?
This is where I learned this: https://www.ibm.com/developerworks/mydeveloperworks/blogs/a9ba1efe-b731-4317-9724-a181d6155e3a/entry/wanna_have_more_control_over_attribute_duplication_on_your_maximo_business_objects_mbos7
If it doesn't work you may a leave a comment on the original article.
If you already set the security attribute for allowing access to Exclude Attribute Data, the next you have to do is, add this menu in Database Configuration "Select Action" menu.
Open CONFIGUR applicaiton (from application designer) and Add/Modify Select Action Menu.
click New Row, choose element type= OPTION and key value= SKIPATT. set menu position as you like. Save. Now you can see it.
Good article. If you need to execute any more logic while duplication you can use automation scripts. Create an object launch point script and type in below.
if (mbo.getString("dupflag")=='DUPHEADER'):
— Any Logic you want —
if (mbo.getString("dupflag")=='DUPHEADER'): not working
its not working for PO mbo as it gives the erro of dupflag attribute not found.
Gang….the Exclude Attribute Data only allows me to select user defined fields. Is there a way to select "Out of the Box" fields???
I didn't find 'dupflag' field for Job Plan.
Need to write a script on Job Plan , whenever user Go to select action–>Click Duplicate Job plan–>After a job plan is created,he/she must get a message Save your record before making may changes.
Pls let me know how to achieve this requirement.
Thanks in advance!!
Have You every found an answer to these ? I need to skip all the Labour Qualification data while duplicating the labour Records in maximo , how to do achieve that ?
Hi,
I have Maxixmo 7.5.1 version and dupflag value is DUPLICATE , but not DUPHEADER.
Please use this , it may be helpful.
Hi, I am able stop coping user defined variable by using Exclude Attribute Data.
Please let me know if you need any help regarding this.
Thanks
Naveen Kumar Madipally
Thanks.. It works.., I wanted to set a field to null only when duplicate but not when creating new record and this code works.
But my field turns to null only after save but not before save. I wanted to make it null before save.
I used Add Event and Before Save option but does not work
Any help on this is much appreciated