<?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 Webscript and Custom content model in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/webscript-and-custom-content-model/m-p/226169#M179299</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I need to change the script,&amp;nbsp; setting the model of content created by me &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(customers is the property that I created in the content model,when )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; upload = userhome.createFile("upload" + userhome.length + "_" + filename) ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; upload.properties.content.write(content);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; upload.properties.encoding = "UTF-8";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; upload.properties.title = title;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; upload.properties.description = description;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG&gt;upload.properties.customers="Rossi"&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Sep 2009 09:19:21 GMT</pubDate>
    <dc:creator>cristina</dc:creator>
    <dc:date>2009-09-17T09:19:21Z</dc:date>
    <item>
      <title>Webscript and Custom content model</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/webscript-and-custom-content-model/m-p/226169#M179299</link>
      <description>I need to change the script,&amp;nbsp; setting the model of content created by me (customers is the property that I created in the content model,when )How can I do this?&amp;nbsp; upload = userhome.createFile("upload" + userhome.length + "_" + filename) ;&amp;nbsp; upload.properties.content.write(content);&amp;nbsp; upload.properties.</description>
      <pubDate>Thu, 17 Sep 2009 09:19:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/webscript-and-custom-content-model/m-p/226169#M179299</guid>
      <dc:creator>cristina</dc:creator>
      <dc:date>2009-09-17T09:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Webscript and Custom content model</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/webscript-and-custom-content-model/m-p/226170#M179300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;don't use&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;upload = userhome.createFile("upload" + userhome.length + "_" + filename) ;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;rather use&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;var node1 = userhome.createNode("create test1.txt", "cm:content");&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;This code along with a couple of more examples can be found &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/JavaScript_API_Cookbook" rel="nofollow noopener noreferrer"&gt;here&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2009 06:57:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/webscript-and-custom-content-model/m-p/226170#M179300</guid>
      <dc:creator>lista</dc:creator>
      <dc:date>2009-09-21T06:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Webscript and Custom content model</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/webscript-and-custom-content-model/m-p/226171#M179301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Lista's right. Then, to set your property, use:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;upload.properties["prefix:propertyName"] = "Rossi";&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;So if you've defined in the "my:" namespace, a "my:content" content model with a "my:customer" property, you should use:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;var node1 = userhome.createNode("you_node_name", "my:content");&lt;BR /&gt;node1.properties.title="whatever title";&lt;BR /&gt;(…)&lt;BR /&gt;node1.properties["my:customer"] = "Rossi";&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sylvain.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 08:17:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/webscript-and-custom-content-model/m-p/226171#M179301</guid>
      <dc:creator>schambon</dc:creator>
      <dc:date>2009-09-22T08:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Webscript and Custom content model</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/webscript-and-custom-content-model/m-p/226172#M179302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's exactly what I needed to know.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks and Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cristina&amp;nbsp; &lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://connect.hyland.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 10:56:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/webscript-and-custom-content-model/m-p/226172#M179302</guid>
      <dc:creator>cristina</dc:creator>
      <dc:date>2009-09-22T10:56:18Z</dc:date>
    </item>
  </channel>
</rss>

