<?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 Script to change Document Type in Properties in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/script-to-change-document-type-in-properties/m-p/283651#M236781</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have an app sending html email into share repository.&amp;nbsp; Alfresco is assigning Document property of Plain Text.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to get a script that simply changes the property setting from plain text to html and can be run as a rule whenever a new plain text doc hits the repository.&amp;nbsp; The transform and copy rule does not work for well for this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am sure this is a simple script but not very good with js&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;played around with some snippets online but none have worked:&amp;nbsp; Any help would be greatly appreciated&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// change the Mimietype of this document&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;document.properties.mimetype = "html";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// save the property modifications&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;document.save();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var file = userhome.createFile("testfile.html");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;file.content = "some HTML here";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;file.mimetype = "text/html";&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Apr 2014 17:17:18 GMT</pubDate>
    <dc:creator>jasonschroeder</dc:creator>
    <dc:date>2014-04-04T17:17:18Z</dc:date>
    <item>
      <title>Script to change Document Type in Properties</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/script-to-change-document-type-in-properties/m-p/283651#M236781</link>
      <description>Have an app sending html email into share repository.&amp;nbsp; Alfresco is assigning Document property of Plain Text.I would like to get a script that simply changes the property setting from plain text to html and can be run as a rule whenever a new plain text doc hits the repository.&amp;nbsp; The transform and co</description>
      <pubDate>Fri, 04 Apr 2014 17:17:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/script-to-change-document-type-in-properties/m-p/283651#M236781</guid>
      <dc:creator>jasonschroeder</dc:creator>
      <dc:date>2014-04-04T17:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: Script to change Document Type in Properties</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/script-to-change-document-type-in-properties/m-p/283652#M236782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;// change the Mimietype of this document&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;document.properties.content.mimetype = "text/html";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// save the property modifications&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;document.save();&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 22:41:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/script-to-change-document-type-in-properties/m-p/283652#M236782</guid>
      <dc:creator>jasonschroeder</dc:creator>
      <dc:date>2014-04-04T22:41:46Z</dc:date>
    </item>
  </channel>
</rss>

