Original Message:
Sent: Wed April 12, 2023 08:46 AM
From: karthik krishnamurthy
Subject: create workorder/woactivity in a single POSTMAN call
Hi Subhransu,
Thank you for your response. The error is coming once i unchecked "Exclude Parent Key attribute" in the object structure level, but the reason i am asking is customer needs WORKORDER.WONUM and WOACTIVITY.WONUM in the response message.
------------------------------
karthik krishnamurthy
Original Message:
Sent: Tue April 04, 2023 03:34 AM
From: Subhransu Sekhar Sahoo
Subject: create workorder/woactivity in a single POSTMAN call
Hi Karthik,
I think the "Exclude Parent Key Attribute" should be checked when you are creating Parent/Child Structure (WO/WOACTIVITY) where you don't have idea of what the parent and task workorder number will be. Also, since this checked, you won't be able to get the key attribute in the response payload of child (Task) even if property set to *.
Don't think Maximo returns the task wonum through the Property header attribute when you are trying to create multiple Tasks for a parent. It only works when you have only one task.
------------------------------
Subhransu Sekhar Sahoo
Original Message:
Sent: Fri March 31, 2023 09:02 AM
From: karthik krishnamurthy
Subject: create workorder/woactivity in a single POSTMAN call
Hi, I am creating workorder in post call using the below payload
{
"siteid": "TEST",
"description" : "Test",
"worktype" : "TEST",
"woactivity":[
{
"taskid" : "10",
"description" : "Task 10"
},
{
"taskid" : "20",
"description" : "Task 20"
}
]
}
using the relationship WORKORDER, WORKORDER/WOACTIVITY in Object Structure XXXX level.
Now i have to save the response(WONUM, WOACTIVTY.WONUM) in some middleware,
My issues are
I can't get the WONUM,WOACTIVITY.WONUM in a single response message. so I enabled "Exclude Parent Attribute" from "Advanced Configuration". if i enabled it throws the below error
{
"Error": {
"errorattrname": "wonum",
"extendedError": {
"moreInfo": {
"href": "https://--------------/maximo/api/error/messages/BMXAA4129E"
}
},
"errorobjpath": "workorder/woactivity",
"correlationid": "2",
"errattrvalue": null,
"reasonCode": "BMXAA4129E",
"message": "BMXAA4129E - The record for Site=TD, Activity=XXXXXX already exists. Ensure that the key value for the given record is unique.",
"statusCode": "400"
}
}
Please help me to achieve this
Thanks,
Karthik Krishnamurthy
------------------------------
karthik krishnamurthy
------------------------------
#MaximoIntegrationandScripting
#Maximo