<?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 How to change content type? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-change-content-type/m-p/251564#M204694</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I can set custom content type when I create node for the first time, but how can I change it afterwards?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My code for setting content type:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;String contentType = "{customNamespace}customLocalName";&lt;BR /&gt;CMLCreate create = new CMLCreate("1", parentReference, null, null, null, contentType, properties);&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Nov 2010 15:06:25 GMT</pubDate>
    <dc:creator>jcustovic</dc:creator>
    <dc:date>2010-11-08T15:06:25Z</dc:date>
    <item>
      <title>How to change content type?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-change-content-type/m-p/251564#M204694</link>
      <description>I can set custom content type when I create node for the first time, but how can I change it afterwards?My code for setting content type&lt;IMG id="smileyfrustrated" class="emoticon emoticon-smileyfrustrated" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-frustrated.png" alt="Smiley Frustrated" title="Smiley Frustrated" /&gt;tring contentType = "{customNamespace}customLocalName";CMLCreate create = new CMLCreate("1", parentReference, null, null, null, contentType, properties);‍‍</description>
      <pubDate>Mon, 08 Nov 2010 15:06:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-change-content-type/m-p/251564#M204694</guid>
      <dc:creator>jcustovic</dc:creator>
      <dc:date>2010-11-08T15:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to change content type?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-change-content-type/m-p/251565#M204695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You have to use the ActionService and you have to execute the specialise-type action with a parameter for the target type:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;Action action = new Action();&lt;BR /&gt;action.setActionName("specialise-type");&lt;BR /&gt;NamedValue[] actionParameters = new NamedValue[]{new NamedValue("type-name", false, "YOUR_CUSTOM_CONTENT_TYPE", null)};&lt;BR /&gt;action.setParameters(actionParameters);&lt;BR /&gt;WebServiceFactory.getActionService().executeActions(predicate, new Action[]{action});&lt;BR /&gt;&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;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 14:35:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-change-content-type/m-p/251565#M204695</guid>
      <dc:creator>openpj</dc:creator>
      <dc:date>2010-11-12T14:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to change content type?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-change-content-type/m-p/251566#M204696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Tnx! Works like a charm…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Nov 2010 12:18:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-change-content-type/m-p/251566#M204696</guid>
      <dc:creator>jcustovic</dc:creator>
      <dc:date>2010-11-15T12:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to change content type?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-change-content-type/m-p/251567#M204697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You have to use the ActionService and you have to execute the specialise-type action with a parameter for the target type:&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;Action action = new Action();&lt;BR /&gt;action.setActionName("specialise-type");&lt;BR /&gt;NamedValue[] actionParameters = new NamedValue[]{new NamedValue("type-name", false, "YOUR_CUSTOM_CONTENT_TYPE", null)};&lt;BR /&gt;action.setParameters(actionParameters);&lt;BR /&gt;WebServiceFactory.getActionService().executeActions(predicate, new Action[]{action});&lt;BR /&gt;&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;/CODE&gt;&lt;/PRE&gt;Hope this helps.&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;Hi OpenPj and every body, as I know YOUR_CUSTOM_CONTENT_TYPE is the &lt;/SPAN&gt;&lt;STRONG&gt;string&lt;/STRONG&gt;&lt;SPAN&gt; value of variable, with name of this variable is type-name in our action. Am i right ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So, if type-name is &lt;/SPAN&gt;&lt;STRONG&gt;noderef &lt;/STRONG&gt;&lt;SPAN&gt;type(example in mail action), how i set value for it ? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I really disturbed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry if my question botthers you !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Dec 2010 19:50:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-change-content-type/m-p/251567#M204697</guid>
      <dc:creator>nguyenhoathuan</dc:creator>
      <dc:date>2010-12-25T19:50:50Z</dc:date>
    </item>
  </channel>
</rss>

