문제

I'm using json web service for service-now to query on the incident records. I'm using java and apache Httpscomponents to make calls. There are huge many records in the incident table, but I want to filter the ones which I need to work upon. With some help from the wiki I was able to fetch the records which are newly added. I want to fetch the records called/created by a particular user.

I make calls on the URL of the form below with the myUserName being the caller whose tickets I need to work upon.

https://<instance>.service-now.com/incident.do?JSON&sysparm_action=getRecords&sysparm_query=incident_state=1%5Ecaller=myUserName

The problem is that I'm still getting all the incidents that are new, meaning the sysparm_query=incident_state=1 is working but the one afterwards fail or gets omitted.

Please tell me if my approach is wrong and point me in the direction, or if its a mistake what might be the correction in the URL?

도움이 되었습니까?

해결책

You could also use a query in this form to use the caller_id if you needed to filter on that field instead:

&sysparm_query=incident_state=1^caller_id.user_name=youruserid

This is useful since it can be employed for other user fields such as assigned_to, etc.

다른 팁

I've found the solution for that question. In the url I should have given 'sys_created_by' or 'sys_updated_by' instead of 'caller'.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top