<MBONAME>.NEW
<MBONAME>.DUPLICATE
<MBONAME>.SAVE
Introduced in 7613.
<MBONAME>.AFTERDUPLICATE
IBM Maximo Autoscripting Guide – OBJECTNAME.DUPLICATE Script (ibm-maximo-dev.github.io)
<MBONAME>.NEW
<MBONAME>.DUPLICATE
<MBONAME>.SAVE
Introduced in 7613.
<MBONAME>.AFTERDUPLICATE
IBM Maximo Autoscripting Guide – OBJECTNAME.DUPLICATE Script (ibm-maximo-dev.github.io)
The requirement is to lock the record so that nobody can delete a record if the purchase order is approved.
And the solution is with a small automation script on DOCLINKS object:
object: DOCLINKS
event: BEFORE SAVE
Type: Object Launch Point
Script: Jython
owner=mbo.getOwner()
if owner and owner.getName()=="PO" and owner.getInternalStatus()=="APPR"
service.error("","Purchase Order is approved. ")
Also ideal to control it via the signature option, create a new signature option from the application designer and grant access using the relevant security groups then just use it in your code. thanks to Steven Shull.
owner.sigopGranted("DELETEATTACH"):
for beginning of the line, Find and Replace as below:
^p
^p+"
for End of the line, Find and Replace as below:
^p
"^p
There was a requirement of Month Parameter to be added on report runtime. The Month was already handled in the report query but we need standalone lookup just for month selection. But Maximo didn't allowed standalone lookup without linking attribute to the parameter.
So we ended up with the below solution to add add Standalone Lookup Using Relationship - Birt Report Parameter (Without New Attribute).
Steps:
Extract the First Day of this Week
1. Go to DATA, Add new columns,
Get Current Date Time
= TODAY() // current datetime
Get Current Day, Month, MonthName, Quarter, Year etc
= TODAY() // current datetime
= mytable[datecolumn].[Quarter]
= mytable[datecolumn].[Day]
= mytable[datecolumn].[Month]
= mytable[datecolumn].[Year]
todayname = format(today(),"dddd") //format to extract the Name of the date.
weekDay= WEEKDAY(TODAY()) //return the day number, it can take 1,2,3 as parameter to start the count from saturday, sunday or monday.
firstDayofThisWeek = today() - WEEKDAY(TODAY()) +1 //today - number of day +1
Get the Last Day of the Week
lastDayofThisWeek = today() - WEEKDAY(TODAY()) +7 //today - number of day +7
firstDayofThisMonth = STARTOFMONTH(TODAY()) //START OF MONTH
Get the Last Day of the Month
lastDayofThisMonth = ENDOFMONTH(TODAY()) //END OF MONTH
Populate a table/column with dates in a range
ourdates = calendar(date(2022,01,01) , date(2022-01-31) ) //first and last day as parameter
Deleting error messages requires two actions.
First the DELETEFLAG must be set to 1, then the status changed to RETRY.
Both of these are done transparently when deleting a message in the Message Reprocessing application. In an escalation they must be done in the correct order.
Warning: Be very careful when using this escalation to delete held messages. If valid transactions are sent in while this escalation is active, and they fail due to a correctable error, they can be deleted.
In the Escalations application, create a new escalation.
Applies To: MAXINTERROR
Condition: status=status='HOLD' and queuename = 'jms/maximo/int/queues/sqout'
Add an escalation point and check the Repeat box.
Add an action. Use the lookup arrow to Go To the Actions app to create the Action.
Create a new Action with the following values:
Object: MAXINTERROR
Type: Set Value
Value: 1
Parameter/Attribute: DELETEFLAG
Save and Return with Value to the Escalations application.