I have created custom folder with custom type with the help of onNewFolder action.Just changing itemId.
Custom folder have field like field1,field2 etc.... There is no cm:name property in that custom type.
Node is created but name is something like 'c3ee5007-296e-4dfa-a642-e5a26ca364fa' but i want to assign name like field1_field2.
How can i do that?
Custom Type :
<types>
<type name="abc
roject">
<title>Project</title>
<parent>cm:folder</parent>
<mandatory-aspects>
<aspect>abc
rojectId</aspect>
<aspect>abc
rojectName</aspect>
<aspect>abc
rojectConsultantName</aspect>
<aspect>abc:region</aspect>
</mandatory-aspects>
</type>
</types>
toolbar.js
this.widgets.newMOTCFolder = Alfresco.util.createYUIButton(this, "newMOTCFolder-button", this.onNewMOTCFolder,
{
disabled: true,
value: "CreateChildren"
});
var templateUrl = YAHOO.lang.substitute(Alfresco.constants.URL_SERVICECONTEXT + "components/form?itemKind={itemKind}&itemId={itemId}&destination={destination}&mode={mode}&submitType={submitType}&formId={formId}&showCancelButton=true",
{
itemKind: "type",
itemId: "abc
roject",
destination: destination,
mode: "create",
submitType: "json",
formId: "doclib-common"
});
etc........
share-config-custom.xml
<config evaluator="model-type" condition="abc
roject">
<forms>
<!-- Default Create Content form -->
<form id="doclib-common">
<field-visibility>
<show id="abc
rojectId" />
<show id="abc
rojectName" />
<show id="abc
rojectConsultantName" />
<show id="abc
man" />
</field-visibility>
<create-form template="../documentlibrary/forms/doclib-common.ftl" />
<appearance>
<field id="abc
rojectId" />
<field id="abc
rojectName" />
<field id="abc
rojectConsultantName"/>
<field id="abc
man" />
</appearance>
</form>
</forms>
</config>