<?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 Cannot add custom property to document in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/cannot-add-custom-property-to-document/m-p/211321#M164451</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;SPAN&gt;How can I add custom properties to documents in my repository?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I followed the example in the alfresco wiki:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/3.2_JavaScript_API#Modifying_and_Creating_API" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/3.2_JavaScript_API#Modifying_and_Creating_API&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;… but when I try to access upload.properties["myCustomProperty0"] from the response template I get an error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;11020015 Error during processing of the template 'Expression upload.properties["myCustomProperty0"] is undefined&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is part of the code in my js file (upload.post.js):&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt; &lt;BR /&gt;//…&lt;BR /&gt;// create document in company home for uploaded file&lt;BR /&gt;&amp;nbsp; upload = companyhome.createFile("BAupload" + companyhome.children.length + "_" + filename) ;&lt;BR /&gt;&amp;nbsp; upload.properties.content.write(content);&lt;BR /&gt;&amp;nbsp; upload.properties.content.mimetype = "UTF-8";&lt;BR /&gt;&amp;nbsp; upload.properties.title = title;&lt;BR /&gt;&amp;nbsp; upload.properties.description = description;&lt;BR /&gt;&amp;nbsp; upload.properties["myCustomProperty0"] = "custompropertyValue";&lt;BR /&gt;&amp;nbsp; upload.save();&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; // setup model for response template&lt;BR /&gt;&amp;nbsp; model.upload = upload;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Dec 2009 17:09:55 GMT</pubDate>
    <dc:creator>edazcalf</dc:creator>
    <dc:date>2009-12-02T17:09:55Z</dc:date>
    <item>
      <title>Cannot add custom property to document</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-add-custom-property-to-document/m-p/211321#M164451</link>
      <description>Hello.How can I add custom properties to documents in my repository?I followed the example in the alfresco wiki:http://wiki.alfresco.com/wiki/3.2_JavaScript_API#Modifying_and_Creating_API… but when I try to access upload.properties["myCustomProperty0"] from the response template I get an error:11020</description>
      <pubDate>Wed, 02 Dec 2009 17:09:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-add-custom-property-to-document/m-p/211321#M164451</guid>
      <dc:creator>edazcalf</dc:creator>
      <dc:date>2009-12-02T17:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot add custom property to document</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-add-custom-property-to-document/m-p/211322#M164452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Solved.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My custom property was successfully updated, but I had to remove and then add the script in order to have the server take the changes made to the js file. Refreshing web script list was not enough.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2009 20:44:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-add-custom-property-to-document/m-p/211322#M164452</guid>
      <dc:creator>edazcalf</dc:creator>
      <dc:date>2009-12-02T20:44:59Z</dc:date>
    </item>
  </channel>
</rss>

