// Recojo último Id de la propiedad del espacio padre
var LastExpID = parseInt(space.properties["ajd:expId"]);
// Se aumenta
var NewExpID = LastExpID + 1;
// Se guarda en el padre el máximo Id
space.properties["ajd:expId"] = NewExpID;
space.save();
//Se cambia el nombre del expediente al nuevo Id
document.name = NewExpID;
document.save();
1
Subes un documento y quedaria 2
y dentro de el un documento con el nombre 2 ¿Correcto?<type name="cm:cmobject">
<title>Object</title>
<parent>sys:base</parent>
<properties>
<property name="cm:name">
<title>Name</title>
<type>d:text</type>
<mandatory enforced="true">true</mandatory>
<default>DEFAULT</default>
<constraints>
<constraint ref="cm:filename" />
</constraints>
</property>
</properties>
<mandatory-aspects>
<aspect>cm:auditable</aspect>
</mandatory-aspects>
</type>
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.