AnsweredAssumed Answered

Unable to create folder/document of custom type

Question asked by bhushanms on Jul 7, 2010
Custom folder type/document type is registered, confirmed using following url, it returns valid xml:
http://host:port/alfresco/service/api/type/F/dctm_folder?includeInheritedProperties=true

But it is not able to create folder of custom type. It is throwing error “CMIS object type F/dctm_folder not understood” (used following parameter) –
<?xml version='1.0' encoding='utf-8'?>
<entry xmlns='http://www.w3.org/2005/Atom' xmlns:cmis='http://www.cmis.org/2008/05'>
<title>dctm_custom</title>
<cmis:object>
<cmis:properties>
<cmis:propertyString cmis:name='ObjectTypeId'>
<cmis:value><![CDATA[F/dctm_folder]]></cmis:value>
</cmis:propertyString>
</cmis:properties>
</cmis:object>
</entry>

The same way it is not able to create document of custom type. It says type not understood.

Just found that custom types are not supported by these web scripts, it has following kind of code:

if (typeId == document)
createDocument()
else if (typeId == folder)
createFolder()
else
Error "Type id abc not understood"

What's the way to create object of custom type?

Outcomes