Retrieve last created Incident Task
I need to retrieve last created incident task(s) comparing with last incident was fetched. As i need to run a SOAP web service which aytomatcically get any created incident tasks and post it into my local Database. Is there a parameter which i can add (instead of TaskID) in the following request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://schemas.hp.com/SM/7" xmlns:com="http://schemas.hp.com/SM/7/Common" xmlns:xm="http://www.w3.org/2005/05/xmlmime"> <soapenv:Header/> <soapenv:Body> <ns:RetrieveIncidentTaskRequest ignoreEmptyElements="true" > <ns:model> <ns:keys> <ns:TaskID type="String">IM3523846-001</ns:TaskID> </ns:keys> <ns:instance /> </ns:model> </ns:RetrieveIncidentTaskRequest> </soapenv:Body> </soapenv:Envelope>
Appreciate your support.
Did you try using the field parent.incident so, you will get all the incident tasks related to one particular IM? Then, you could get the first one in the list or the last one depending on the sort returned.