SOAP API not returning Incident number

scwillson
Mega Guru

I'd like to preface this with the fact that I am a novice when it comes to REST/SOAP APIs.

I have a client creating new Incidents with values successfully, but the API is not returning the Incident number to them. I am not sure what to even check for in the script they are using, to send back the records display value. I did find in the wiki info about the "displayvalue=true" parameter of the URL, but that was only for reference fields which wouldn't be relevant to getting the Incident "number" field. It had worked with another instance. The field names, access credentials and instance URL have all been updated.

Any assistance would be appreciated Let me know what kind of details you might need to see...

Sample Code:

[string] $webServiceUri = "https://COMPANY.service-now.com/incident.do?sys_id=-1&sysparm_template=brightlight&WSDL",

1 ACCEPTED SOLUTION

scwillson
Mega Guru

Opened a ticket in HI, and it turns out there was an issue with the clients scripting. I believe they were using powershell.


View solution in original post

8 REPLIES 8

Hi Simon,



You're getting there...



incident.do?-- indicating the table - YES. This says "I want to do something with an incident record."


sys_id=-1         -- new record - correct, create a new record.
&sysparm_template=brightlight   -- loads the template "brightlight" - yes. use the values from the template named "brightlight"


&WSDL -- (specifies to use WSDL?. Should it be "?WSDL" instead?) - Not needed for each invididual SOAP request. It says "What rules can I play by. I'll download those and save them for later if I need them."



The first URI argument after the table name (incident.do) gets a question mark, successive ones are separated by &. Common web navigation stuff here. Nothing ServiceNow special.


No, you'll want to do an insert on incident.do?SOAP and then pass the arguments after that.


Stupid me. Forest for the trees. I was caught in the weeds. Mike is correct. It's all in the SOAP wiki page I linked earlier.


scwillson
Mega Guru

Opened a ticket in HI, and it turns out there was an issue with the clients scripting. I believe they were using powershell.