GetRecords that are approved in ServiceNow API

╄→尐↘猪︶ㄣ 提交于 2019-12-24 12:53:54

问题


ServiceNow - GetRecords

Code:

           var proxy = new ServiceNow_dmn_demand()
            {
                Url = "https://<instance>.service-now.com/dmn_demand.do?SOAP",
                Credentials = new NetworkCredential("username", "password")
            };

            var objRecord = new Service.getRecords
            {
                // Here, I want to filter the records that are approved..
            };

            var recordResults = proxy.getRecords(objRecord);

I am getting all the records.

I want to get the records that are only approved. But I don't know the exact field name used to filter the Approved records.


回答1:


You are looking for the state field, and specifically where state=8. This table extends the Task where the State field is defined. If you look at the choice list for that state field on task you will see value=8, has label of approved. If you query for only dmn_demand records where state = 8 this should give you what you want. Also consider using the ServiceNow REST API and the ServiceNow REST API Explorer (in Fuji release) to help you build and test these requests.



来源:https://stackoverflow.com/questions/29232613/getrecords-that-are-approved-in-servicenow-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!