<?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: Live Profile in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/live-profile/m-p/2520654#M981939</link>
    <description>&lt;P&gt;You would want to get all of the live profile records to be updated, loop through them, and set the field to what you want &amp;amp; update().&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could do something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var liveProfiles = new GlideRecord("live_profile");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;liveProfiles.addQuery('active', true);&lt;/P&gt;&lt;P&gt;while(liveProfiles.next()) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; //set the name to equal the value of 'document' field&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; liveProfiles.name = liveProfiles.document;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; liveProfiles.update();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I didn't actually try this, but you would do something very similar.&amp;nbsp; I am just querying for all the live_profile records that are active, looping through them, and setting the 'name' to be the value of the 'document' field.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Mar 2023 16:45:17 GMT</pubDate>
    <dc:creator>Marcus Walbridg</dc:creator>
    <dc:date>2023-03-29T16:45:17Z</dc:date>
    <item>
      <title>Live Profile</title>
      <link>https://www.servicenow.com/community/developer-forum/live-profile/m-p/2520533#M981893</link>
      <description>&lt;P&gt;Create a fix script that from the live_profile table goes into the sys_user table and finds a match on name (name on user record = name on live profile record) and sets the Field to that record's sys_id.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 15:05:53 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/live-profile/m-p/2520533#M981893</guid>
      <dc:creator>Darshana2</dc:creator>
      <dc:date>2023-03-29T15:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Live Profile</title>
      <link>https://www.servicenow.com/community/developer-forum/live-profile/m-p/2520624#M981924</link>
      <description>&lt;P&gt;I am assuming that you want to set the 'name' field on live_profile records to be the sys id of the User record it is referencing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You already have the sys id of the user in the 'document' field.&amp;nbsp; It is a reference to the user record.&amp;nbsp; However you could make a fix script to do this. You do not even need to query the sys_user table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just take the values in the 'document' field in the live_profile records and put it in the 'name' field.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 16:23:40 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/live-profile/m-p/2520624#M981924</guid>
      <dc:creator>Marcus Walbridg</dc:creator>
      <dc:date>2023-03-29T16:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: Live Profile</title>
      <link>https://www.servicenow.com/community/developer-forum/live-profile/m-p/2520641#M981932</link>
      <description>&lt;P&gt;What is the fix script for fetching the data&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 16:37:33 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/live-profile/m-p/2520641#M981932</guid>
      <dc:creator>Darshana2</dc:creator>
      <dc:date>2023-03-29T16:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Live Profile</title>
      <link>https://www.servicenow.com/community/developer-forum/live-profile/m-p/2520654#M981939</link>
      <description>&lt;P&gt;You would want to get all of the live profile records to be updated, loop through them, and set the field to what you want &amp;amp; update().&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could do something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var liveProfiles = new GlideRecord("live_profile");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;liveProfiles.addQuery('active', true);&lt;/P&gt;&lt;P&gt;while(liveProfiles.next()) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; //set the name to equal the value of 'document' field&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; liveProfiles.name = liveProfiles.document;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; liveProfiles.update();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I didn't actually try this, but you would do something very similar.&amp;nbsp; I am just querying for all the live_profile records that are active, looping through them, and setting the 'name' to be the value of the 'document' field.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 16:45:17 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/live-profile/m-p/2520654#M981939</guid>
      <dc:creator>Marcus Walbridg</dc:creator>
      <dc:date>2023-03-29T16:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: Live Profile</title>
      <link>https://www.servicenow.com/community/developer-forum/live-profile/m-p/2544674#M990963</link>
      <description>&lt;P&gt;we have&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;fetching the data from user table not from&amp;nbsp;'document' field for that we have to write fix script&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 16:22:49 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/live-profile/m-p/2544674#M990963</guid>
      <dc:creator>Darshana2</dc:creator>
      <dc:date>2023-04-25T16:22:49Z</dc:date>
    </item>
  </channel>
</rss>

