<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Case API returning &amp;quot;record not found&amp;quot; when querying with number in Community Central forum</title>
    <link>https://www.servicenow.com/community/community-central-forum/case-api-returning-quot-record-not-found-quot-when-querying-with/m-p/3419977#M5308</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem with case API. When i used the GET with the case number to query case by id, the result is "record not found". If i changed to the case sys_id, everything works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone had the issue and had resolved it ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Nov 2025 11:07:04 GMT</pubDate>
    <dc:creator>richardphon</dc:creator>
    <dc:date>2025-11-05T11:07:04Z</dc:date>
    <item>
      <title>Case API returning "record not found" when querying with number</title>
      <link>https://www.servicenow.com/community/community-central-forum/case-api-returning-quot-record-not-found-quot-when-querying-with/m-p/3419977#M5308</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem with case API. When i used the GET with the case number to query case by id, the result is "record not found". If i changed to the case sys_id, everything works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone had the issue and had resolved it ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2025 11:07:04 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/case-api-returning-quot-record-not-found-quot-when-querying-with/m-p/3419977#M5308</guid>
      <dc:creator>richardphon</dc:creator>
      <dc:date>2025-11-05T11:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Case API returning "record not found" when querying with number</title>
      <link>https://www.servicenow.com/community/community-central-forum/case-api-returning-quot-record-not-found-quot-when-querying-with/m-p/3419994#M5309</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;Check the query and compare URI&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Shruti_0-1762342599761.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/480514i5B2728480632B643/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Shruti_0-1762342599761.png" alt="Shruti_0-1762342599761.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Shruti_1-1762342700732.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/480515i178555416E4DB0C2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Shruti_1-1762342700732.png" alt="Shruti_1-1762342700732.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2025 11:38:49 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/case-api-returning-quot-record-not-found-quot-when-querying-with/m-p/3419994#M5309</guid>
      <dc:creator>Shruti</dc:creator>
      <dc:date>2025-11-05T11:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Case API returning "record not found" when querying with number</title>
      <link>https://www.servicenow.com/community/community-central-forum/case-api-returning-quot-record-not-found-quot-when-querying-with/m-p/3420007#M5310</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/715231"&gt;@richardphon&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it's an OOTB scripted REST API and here is the info, you can see which endpoint and HTTP Method is good for you&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AnkurBawiskar_0-1762342905154.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/480517iC2C6673FCF2B444F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AnkurBawiskar_0-1762342905154.png" alt="AnkurBawiskar_0-1762342905154.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;it worked for me as admin with Both Number&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AnkurBawiskar_1-1762342983772.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/480518i33514CF699692C2C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AnkurBawiskar_1-1762342983772.png" alt="AnkurBawiskar_1-1762342983772.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AnkurBawiskar_2-1762343025604.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/480524i037BEDF903E8A376/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AnkurBawiskar_2-1762343025604.png" alt="AnkurBawiskar_2-1762343025604.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":light_bulb:"&gt;💡&lt;/span&gt; If my response helped, please mark it as correct &lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; and close the thread &lt;span class="lia-unicode-emoji" title=":locked:"&gt;🔒&lt;/span&gt;— this helps future readers find the solution faster! &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2025 11:43:58 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/case-api-returning-quot-record-not-found-quot-when-querying-with/m-p/3420007#M5310</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2025-11-05T11:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: Case API returning "record not found" when querying with number</title>
      <link>https://www.servicenow.com/community/community-central-forum/case-api-returning-quot-record-not-found-quot-when-querying-with/m-p/3420901#M5320</link>
      <description>&lt;P&gt;Hi Ankur,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, i think the script has been modify. Can you provide me the original script ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Thu, 06 Nov 2025 08:35:05 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/case-api-returning-quot-record-not-found-quot-when-querying-with/m-p/3420901#M5320</guid>
      <dc:creator>richardphon</dc:creator>
      <dc:date>2025-11-06T08:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: Case API returning "record not found" when querying with number</title>
      <link>https://www.servicenow.com/community/community-central-forum/case-api-returning-quot-record-not-found-quot-when-querying-with/m-p/3420930#M5321</link>
      <description>&lt;P&gt;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/715231"&gt;@richardphon&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;sure here is the link, replace it with your instance name&lt;/P&gt;
&lt;P&gt;https://&lt;STRONG&gt;instanceName&lt;/STRONG&gt;.service-now.com/nav_to.do?uri=sys_ws_definition.do?sys_id=771aaa2f5342030097a2ddeeff7b127d&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AnkurBawiskar_0-1762419976889.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/480761i26387ABB39F0F07F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AnkurBawiskar_0-1762419976889.png" alt="AnkurBawiskar_0-1762419976889.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":light_bulb:"&gt;💡&lt;/span&gt; If my response helped, please mark it as correct &lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; and close the thread &lt;span class="lia-unicode-emoji" title=":locked:"&gt;🔒&lt;/span&gt;— this helps future readers find the solution faster! &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Nov 2025 09:06:22 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/case-api-returning-quot-record-not-found-quot-when-querying-with/m-p/3420930#M5321</guid>
      <dc:creator>Ankur Bawiskar</dc:creator>
      <dc:date>2025-11-06T09:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: Case API returning "record not found" when querying with number</title>
      <link>https://www.servicenow.com/community/community-central-forum/case-api-returning-quot-record-not-found-quot-when-querying-with/m-p/3421001#M5323</link>
      <description>&lt;P&gt;Hi Ankur,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you but, i wanted the script not the link.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think someone has modified the script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the code :&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt; process(&lt;/SPAN&gt;&lt;SPAN&gt;/*RESTAPIRequest*/&lt;/SPAN&gt;&lt;SPAN&gt; request, &lt;/SPAN&gt;&lt;SPAN&gt;/*RESTAPIResponse*/&lt;/SPAN&gt;&lt;SPAN&gt; response) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; caseId = decodeURI(request.pathParams.id);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; displayValue;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(request.queryParams.sysparm_display_value ||request.queryParams.display_value ){&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; displayValue = request.queryParams.sysparm_display_value ? request.queryParams.sysparm_display_value+ &lt;/SPAN&gt;&lt;SPAN&gt;''&lt;/SPAN&gt;&lt;SPAN&gt; :request.queryParams.display_value+&lt;/SPAN&gt;&lt;SPAN&gt;''&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; result = [];&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; caseHandle = &lt;/SPAN&gt;&lt;SPAN&gt;new&lt;/SPAN&gt; &lt;SPAN&gt;Case&lt;/SPAN&gt;&lt;SPAN&gt;();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(!result)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;SPAN&gt; sn_ws_err.&lt;/SPAN&gt;&lt;SPAN&gt;NotFoundError&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"No Record found"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;SPAN&gt; result;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;})(request, response);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;i think that the part of the "result" has been modified.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks in advance fo your help.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Richard.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Nov 2025 10:00:06 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/case-api-returning-quot-record-not-found-quot-when-querying-with/m-p/3421001#M5323</guid>
      <dc:creator>richardphon</dc:creator>
      <dc:date>2025-11-06T10:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: Case API returning "record not found" when querying with number</title>
      <link>https://www.servicenow.com/community/community-central-forum/case-api-returning-quot-record-not-found-quot-when-querying-with/m-p/3445351#M5589</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/715231"&gt;@richardphon&lt;/a&gt;&amp;nbsp;, I am facing the similar issue with this api, on providing the sys_id its working but on querying with number its failing with 404, record not found.&amp;nbsp;&lt;BR /&gt;Did you get a fix for this issue?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Dec 2025 07:17:08 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/case-api-returning-quot-record-not-found-quot-when-querying-with/m-p/3445351#M5589</guid>
      <dc:creator>ManasiP</dc:creator>
      <dc:date>2025-12-09T07:17:08Z</dc:date>
    </item>
  </channel>
</rss>

