<?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 Сreate a file from a template in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/%D1%81reate-a-file-from-a-template/m-p/21580#M9512</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #212121; background-color: #ffffff; font-size: 29px;"&gt;I found this code to create a file from a template&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background-color: #f5f5f5; border: 1px none #cccccc; margin: 0px 0px 1em; padding: 0.5em 1em;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Data to fill in the template var num = "42"; var buyer = "Acme, Inc"; var sum = "700$";&amp;nbsp; // Get template file var tempFile = search.findNode( "workspace://SpacesStore/262981fb-e141-43bd-ac63-9b8199eb1077" ); // Get target folder var folder = search.findNode( "workspace://SpacesStore/ef296491-90ff-4427-a06a-31fd4abf4245" ); // Name of new file to be created var name = "Invoice " + num;&amp;nbsp; // Create string with data to fill the template. // Parameters names (number, company, amount) match the names in the template. var data = jsonUtils.toJSONString( {"Number": num, "CustomerName": buyer, "Amount": sum} );&amp;nbsp; // Create new file template.generate( tempFile, folder, name, data );&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="" data-fulltext="" data-placeholder="Перевод" dir="ltr" style="color: #212121; background-color: #ffffff; border: none; font-size: 29px !important; padding: 0px 0.14em 0px 0px;"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;But it does not work says not found&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;PRE class="" style="color: #000000; background-color: #f5f5f5; border: 1px none #cccccc; margin: 0px 0px 1em; padding: 0.5em 1em;"&gt;jsonUtils and&lt;PRE class="" style="color: #000000; background-color: #f5f5f5; border: 1px none #cccccc; margin: 0px 0px 1em; padding: 0.5em 1em;"&gt;template.generate&lt;/PRE&gt;&lt;/PRE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #212121; background-color: #ffffff; font-size: 16px;"&gt;Tell me how to fix this or how to create a file from the template correctly&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 May 2017 10:22:23 GMT</pubDate>
    <dc:creator>taibek</dc:creator>
    <dc:date>2017-05-25T10:22:23Z</dc:date>
    <item>
      <title>Сreate a file from a template</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/%D1%81reate-a-file-from-a-template/m-p/21580#M9512</link>
      <description>I found this code to create a file from a template&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Data to fill in the template var num = "42"; var buyer = "Acme, Inc"; var sum = "700$";&amp;nbsp; // Get template file var tempFile = search.findNode( "workspace://SpacesStore/262981fb-e141-43bd-ac63-9b8199eb1077" ); // Get target folder var folder =</description>
      <pubDate>Thu, 25 May 2017 10:22:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/%D1%81reate-a-file-from-a-template/m-p/21580#M9512</guid>
      <dc:creator>taibek</dc:creator>
      <dc:date>2017-05-25T10:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Сreate a file from a template</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/%D1%81reate-a-file-from-a-template/m-p/21581#M9513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;where is the script with this snippet? what version of alfresco are you using?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 May 2017 11:58:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/%D1%81reate-a-file-from-a-template/m-p/21581#M9513</guid>
      <dc:creator>mrks_js1</dc:creator>
      <dc:date>2017-05-27T11:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Сreate a file from a template</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/%D1%81reate-a-file-from-a-template/m-p/21582#M9514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #212121; background-color: #ffffff; font-size: 16px;"&gt;I'm new in alfresco. I try to write such a script, but it does not work.Im using 5.2 version.I want to create file with template at ui of process&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 May 2017 12:15:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/%D1%81reate-a-file-from-a-template/m-p/21582#M9514</guid>
      <dc:creator>taibek</dc:creator>
      <dc:date>2017-05-27T12:15:28Z</dc:date>
    </item>
  </channel>
</rss>

