<?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 Re: SNC.AssessmentCreation().createOrGetAssessment() Functionality in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/snc-assessmentcreation-createorgetassessment-functionality/m-p/2235221#M887205</link>
    <description>&lt;P&gt;&amp;nbsp;Interesting requirement, also very clearly explained,&amp;nbsp;I replicated the requirement and it seems to work for me, what I did is this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;&lt;LI&gt;Took an existing survey and made it public&lt;/LI&gt;&lt;LI&gt;I used a trigger condition to create an instance of the survey associated with a record and a user, this to simulate your script&lt;/LI&gt;&lt;LI&gt;Navigated to&amp;nbsp;asmt_assessment_instance.list then opened the newly created existing instance form and used the related link named "view instance URL", this provided a link in the correct format:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/80550iA3D13D197F071070/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;Copied this URL and used it on a different unlogged browser and was able to close it without it creating another one&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The format that seems to work is this:&lt;/P&gt;
&lt;P&gt;https://&amp;lt;yourInstance&amp;gt;.service-now.com/nav_to.do?uri=assessment_take2.do%3Fsysparm_assessable_type=87186844d7211100158ba6859e610378%26sysparm_assessable_sysid=c3b76757db1023007837560868961909&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope this helps,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;David&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 08 Sep 2018 00:23:33 GMT</pubDate>
    <dc:creator>David Ramirez</dc:creator>
    <dc:date>2018-09-08T00:23:33Z</dc:date>
    <item>
      <title>SNC.AssessmentCreation().createOrGetAssessment() Functionality</title>
      <link>https://www.servicenow.com/community/developer-forum/snc-assessmentcreation-createorgetassessment-functionality/m-p/2235220#M887204</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;Recently I have been working on an enhancement that requests a survey to not require authentication for users. I realize that this is an out-of-box functionality (with the 'Public' option), but&amp;nbsp;we require the incident that the survey is attached to to be attached to the survey (as the survey trigger id), and this is causing difficulty in fulfilling the enhancement requirements.&lt;/P&gt;
&lt;P&gt;When an incident is resolved, a notification is triggered to the user with the link to a survey inside. I have developed this to the point where the script that generates the link also creates and inserts a new survey instance (see code):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/80552iA18B74E6DC698186/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The problem I have arises from the&amp;nbsp;&lt;STRONG&gt;assessment_take2.do?&lt;/STRONG&gt; UI page reference at the beginning of the url. When an unauthenticated user clicks the generated link, the UI page will automatically create a&amp;nbsp;&lt;EM&gt;completely new&amp;nbsp;&lt;/EM&gt;survey instance with no trigger ID associated,&amp;nbsp;&lt;EM&gt;via&amp;nbsp;&lt;/EM&gt;the method I have specified in the question title (see image below):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/80553i58DA1D7AAF19963C/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I have attempted to pull the sysparm_assessible_sysid AND the sysparm_trigger_id into the UI page, to no avail. The ServiceNow Documentation of the AssessmentCreation() method (Accessable &lt;A href="https://docs.servicenow.com/bundle/kingston-application-development/page/app-store/dev_portal/API_reference/AssessmentCreation/concept/c_AssessmentCreation.html" rel="nofollow"&gt;here&lt;/A&gt;) does not mention this method. Thus I am blind as to what parameters to experiment with, or what output to expect.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could anyone shed some light on this method, or perhaps suggest other ways to accomplish the goal I am attempting to reach?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 20:17:08 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/snc-assessmentcreation-createorgetassessment-functionality/m-p/2235220#M887204</guid>
      <dc:creator>Michael Lorincz</dc:creator>
      <dc:date>2018-09-07T20:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: SNC.AssessmentCreation().createOrGetAssessment() Functionality</title>
      <link>https://www.servicenow.com/community/developer-forum/snc-assessmentcreation-createorgetassessment-functionality/m-p/2235221#M887205</link>
      <description>&lt;P&gt;&amp;nbsp;Interesting requirement, also very clearly explained,&amp;nbsp;I replicated the requirement and it seems to work for me, what I did is this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;&lt;LI&gt;Took an existing survey and made it public&lt;/LI&gt;&lt;LI&gt;I used a trigger condition to create an instance of the survey associated with a record and a user, this to simulate your script&lt;/LI&gt;&lt;LI&gt;Navigated to&amp;nbsp;asmt_assessment_instance.list then opened the newly created existing instance form and used the related link named "view instance URL", this provided a link in the correct format:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/80550iA3D13D197F071070/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;Copied this URL and used it on a different unlogged browser and was able to close it without it creating another one&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The format that seems to work is this:&lt;/P&gt;
&lt;P&gt;https://&amp;lt;yourInstance&amp;gt;.service-now.com/nav_to.do?uri=assessment_take2.do%3Fsysparm_assessable_type=87186844d7211100158ba6859e610378%26sysparm_assessable_sysid=c3b76757db1023007837560868961909&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope this helps,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;David&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Sep 2018 00:23:33 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/snc-assessmentcreation-createorgetassessment-functionality/m-p/2235221#M887205</guid>
      <dc:creator>David Ramirez</dc:creator>
      <dc:date>2018-09-08T00:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: SNC.AssessmentCreation().createOrGetAssessment() Functionality</title>
      <link>https://www.servicenow.com/community/developer-forum/snc-assessmentcreation-createorgetassessment-functionality/m-p/2235222#M887206</link>
      <description>&lt;P&gt;Also in the past, I had to create a custom clone of the&amp;nbsp;assessment_take2 UI Page to achieve some very specific requirements, and this is something you could do if really needed, but I would consider it a last resource due to upgradability issues.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Sep 2018 00:26:44 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/snc-assessmentcreation-createorgetassessment-functionality/m-p/2235222#M887206</guid>
      <dc:creator>David Ramirez</dc:creator>
      <dc:date>2018-09-08T00:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: SNC.AssessmentCreation().createOrGetAssessment() Functionality</title>
      <link>https://www.servicenow.com/community/developer-forum/snc-assessmentcreation-createorgetassessment-functionality/m-p/2235223#M887207</link>
      <description>&lt;P&gt;David,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your reply. The trigger condition was the missing link; once I had that in place, I was able to grab the Assessment Instance link with this code:&lt;/P&gt;
&lt;P&gt;var gr = new GlideRecord('asmt_assessment_instance');&lt;BR /&gt; gr.addQuery('trigger_id', current.sys_id);&lt;BR /&gt; gr.query();&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt; if(gr.next()){&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;var assessmentID = gr.sys_id;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;var link = new AssessmentUtils().getAssessmentInstanceURL(assessmentID);&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your assistance is much appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Sep 2018 18:59:37 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/snc-assessmentcreation-createorgetassessment-functionality/m-p/2235223#M887207</guid>
      <dc:creator>Michael Lorincz</dc:creator>
      <dc:date>2018-09-19T18:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: SNC.AssessmentCreation().createOrGetAssessment() Functionality</title>
      <link>https://www.servicenow.com/community/developer-forum/snc-assessmentcreation-createorgetassessment-functionality/m-p/3139527#M1168845</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/361316"&gt;@Michael Lorincz&lt;/a&gt;&amp;nbsp;!&amp;nbsp; I know this is an old thread but Im facing same issues here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where did you place that first code you mentioned ? Is that a email script?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, are you just triggering a notification when the "INC is resolved/closed", with the email script on it?.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2025 15:12:50 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/snc-assessmentcreation-createorgetassessment-functionality/m-p/3139527#M1168845</guid>
      <dc:creator>Gpope</dc:creator>
      <dc:date>2025-01-02T15:12:50Z</dc:date>
    </item>
  </channel>
</rss>

