<?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>topic Re: Assign person custom field with a person in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/assign-person-custom-field-with-a-person/m-p/282084#M235214</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;After surfing the forums below was the solution I emulated, hope it helps others. My custom field sop:sourceSubPerson was an association to cm&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;erson so an update to properties method did not do anything. An association must be created in the node containing the custom field and that was done by the below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var parentFolder = document.parentAssocs["cm:contains"][0];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var person = people.getPerson('Bautista');&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;parentFolder.createAssociation(person, "sop:sourceSubPerson");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;parentFolder.save();&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Feb 2013 19:12:16 GMT</pubDate>
    <dc:creator>tchenm1</dc:creator>
    <dc:date>2013-02-25T19:12:16Z</dc:date>
    <item>
      <title>Assign person custom field with a person</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/assign-person-custom-field-with-a-person/m-p/282081#M235211</link>
      <description>During a workflow progression I would like to set a custom type persons field to different people.The "sop:sourceSubPerson" is our custom field associated to the parent folder of the document. However this line of code is not working.parentFolder.properties["sop:sourceSubPerson"] = people.getPerson(</description>
      <pubDate>Sat, 23 Feb 2013 00:01:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/assign-person-custom-field-with-a-person/m-p/282081#M235211</guid>
      <dc:creator>tchenm1</dc:creator>
      <dc:date>2013-02-23T00:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Assign person custom field with a person</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/assign-person-custom-field-with-a-person/m-p/282082#M235212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;please keep in mind that any changes to properties in a JavaScript-based action / script will only be saved when you explicitly call the save() method on the ScriptNode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In your case:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;parentFolder.properties["sop:sourceSubPerson"] = people.getPerson("Bautista");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;parentFolder.save();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Feb 2013 20:06:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/assign-person-custom-field-with-a-person/m-p/282082#M235212</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2013-02-23T20:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: Assign person custom field with a person</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/assign-person-custom-field-with-a-person/m-p/282083#M235213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi AFaust,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, I did call a save method just didn't include it in the code sample. I think the problem with the custom field (sop:sourceSubPerson) is that it is an association to the cm&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;erson class. When I view the node, I see that the sop:sourceSubPerson property contains the name. However, it does not appear in the Share interface.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I populate the field through the share interface and view the node, the Association of the node is populated with the person target reference. So am I to assume I need to be saving an association? And how would I do that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks so much!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike T&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 17:10:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/assign-person-custom-field-with-a-person/m-p/282083#M235213</guid>
      <dc:creator>tchenm1</dc:creator>
      <dc:date>2013-02-25T17:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Assign person custom field with a person</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/assign-person-custom-field-with-a-person/m-p/282084#M235214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;After surfing the forums below was the solution I emulated, hope it helps others. My custom field sop:sourceSubPerson was an association to cm&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;erson so an update to properties method did not do anything. An association must be created in the node containing the custom field and that was done by the below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var parentFolder = document.parentAssocs["cm:contains"][0];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var person = people.getPerson('Bautista');&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;parentFolder.createAssociation(person, "sop:sourceSubPerson");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;parentFolder.save();&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 19:12:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/assign-person-custom-field-with-a-person/m-p/282084#M235214</guid>
      <dc:creator>tchenm1</dc:creator>
      <dc:date>2013-02-25T19:12:16Z</dc:date>
    </item>
  </channel>
</rss>

