08-19-2009 03:11 PM
var Standard = document.properties["custom:AStandard"];
var Produkt = document.properties["custom:AProduktformat"];
var dest = companyhome.childByNamePath("ComTeam AG/Produktformate/" + Produkt);
document.move(dest);
var Produkt = document.properties["custom:AProduktformat"];
var Standard = document.properties["custom:AStandard"];
var Rahmen = document.properties["custom:ARahmen"];
var Kunde = document.properties["custom:AKunde"];
var Auftrag = document.properties["custom:AAuftrag"];
if (Standard == "Ja" && Rahmen == "Ja")
{
document.remove();
}
if (Standard == "Ja")
{
var Sziel = "ComTeam AG/Produktformate/" + Produkt;
var Sdest = companyhome.childByNamePath(Sziel);
document.move(Sdest);
}
if (Rahmen == "Ja")
{
var Rziel = "ComTeam AG/Kunden/" + Kunde + "/01 Rahmendokumente";
var Rdest = companyhome.childByNamePath(Rziel);
document.move(Rdest);
}
if (Standard == "Nein" && Rahmen == "Nein")
{
var Aziel = "ComTeam AG/Kunden/" + Kunde + "/02 Auftragsordner/" + Auftrag;
var Adest = companyhome.childByNamePath(Aziel);
document.move(Adest);
}
08-30-2009 05:21 PM
var Produkt = document.properties["custom:AProduktformat"];
var Struktur = document.properties["custom:AStruktur"];
var Kunde = document.properties["custom:AKunde"];
var Auftrag = document.properties["custom:AAuftrag"];
var Ressource = document.properties["custom:ARessource"];
if (Struktur == "Produktformat Vorlage")
{
var Pziel = "ComTeam AG/Produktformate/" + Produkt;
var Pdest = companyhome.childByNamePath(Pziel);
document.move(Pdest);
}
if (Struktur == "Rahmendokument")
{
var Dziel = "ComTeam AG/Kunden/" + Kunde + "/01 Rahmendokumente";
var Ddest = companyhome.childByNamePath(Dziel);
document.move(Ddest);
}
if (Struktur == "Auftragsdokument")
{
var Aziel = "ComTeam AG/Kunden/" + Kunde + "/02 Auftragsordner/" + Auftrag;
var Adest = companyhome.childByNamePath(Aziel);
document.move(Adest);
}
if (Struktur == "Ressource")
{
var Rziel = "ComTeam AG/Ressourcen/" + Ressource;
var Rdest = companyhome.childByNamePath(Rziel);
document.move(Rdest);
}
<?xml version="1.0" encoding="UTF-8"?>
<model name="custom:customModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!– Optional meta-data about the model –>
<description>Custom Model</description>
<author>Sebastian Danninger</author>
<version>1.0</version>
<imports>
<!– Import Alfresco Dictionary Definitions –>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<!– Import Alfresco Content Domain Model Definitions –>
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
</imports>
<!– Introduction of new namespaces defined by this model –>
<!– NOTE: The following namespace custom.model should be changed to reflect your own namespace –>
<namespaces>
<namespace uri="custom.model" prefix="custom"/>
</namespaces>
<constraints>
<constraint name="custom:Kundenliste"
type="org.alfresco.sample.constraints.LuceneSearchBasedListConstraint" >
<parameter name="query">
<value> PATH:"/app:company_home/cm:ComTeam_x0020_AG/cm:Kunden/*" AND TYPE:"{http://www.alfresco.org/model/content/1.0}folder"
</value>
</parameter>
</constraint>
<constraint name="custom:Produktformate"
type="org.alfresco.sample.constraints.LuceneSearchBasedListConstraint" >
<parameter name="query">
<value> PATH:"/app:company_home/cm:ComTeam_x0020_AG/cm:Produktformate/*" AND TYPE:"{http://www.alfresco.org/model/content/1.0}folder"
</value>
</parameter>
</constraint>
<constraint name="custom:Auftragsliste"
type="org.alfresco.sample.constraints.LuceneSearchBasedListConstraint" >
<parameter name="query">
<value> PATH:"/app:company_home/cm:ComTeam_x0020_AG/cm:Kunden/cm:${custom:AKunde}/cm:_x0030_2_x0020_Auftragsordner//*" AND TYPE:"{http://www.alfresco.org/model/content/1.0}folder" </value>
</parameter>
</constraint>
<constraint name="custom:Ressourcen"
type="org.alfresco.sample.constraints.LuceneSearchBasedListConstraint" >
<parameter name="query">
<value> PATH:"/app:company_home/cm:ComTeam_x0020_AG/cm:Ressourcen/*" AND TYPE:"{http://www.alfresco.org/model/content/1.0}folder"
</value>
</parameter>
</constraint>
<constraint name="custom:dokumententypliste" type="LIST">
<parameter name="allowedValues">
<list>
<value>Angebot</value>
<value>Vertrag</value>
<value>Korrespondenz</value>
<value>Rechnung</value>
<value>Kundendokument</value>
<value>Input</value>
<value>Ablauf</value>
<value>TN Unterlagen</value>
<value>Präsentation / Plot</value>
<value>Protokoll</value>
<value>Projektplan</value>
</list>
</parameter>
</constraint>
<constraint name="custom:struktur" type="LIST">
<parameter name="allowedValues">
<list>
<value>Rahmendokument</value>
<value>Auftragsdokument</value>
<value>Produktformat Vorlage</value>
<value>Ressource</value>
</list>
</parameter>
</constraint>
</constraints>
<types>
—————
</types>
<aspects>
<aspect name="custom:Kunde">
<title>Kunde</title>
<properties>
<!– Checkbox für Struktur –>
<property name="custom:AStruktur">
<title>Rahmendokument</title>
<type>d:text</type>
<mandatory>true</mandatory>
<multiple>true</multiple>
<constraints>
<constraint ref="custom:struktur" />
</constraints>
</property>
<!– Dokumententyp - statische Liste –>
<property name="custom:ADokumententyp">
<title>Dokumententyp</title>
<type>d:text</type>
<mandatory>true</mandatory>
<multiple>true</multiple>
<constraints>
<constraint ref="custom:dokumententypliste" />
</constraints>
</property>
<!– Kundenliste aus dem Space ComTeam/Kunden –>
<property name="custom:AKunde">
<title>Kunde</title>
<type>d:text</type>
<default>ComTeam</default>
<constraints>
<constraint ref="custom:Kundenliste" />
</constraints>
</property>
<!– Auftragsliste Abhängig vom Kunden –>
<property name="custom:AAuftrag">
<title>Auftrag</title>
<type>d:text</type>
<multiple>true</multiple>
<constraints>
<constraint ref="custom:Auftragsliste" />
</constraints>
</property>
<!– Produktformat Liste aus Space ComTeam/Produktformate –>
<property name="custom:AProduktformat">
<title>Produktformat</title>
<type>d:text</type>
<multiple>true</multiple>
<index enabled="true">
<atomic>true</atomic>
<stored>false</stored>
<tokenised>false</tokenised>
</index>
<constraints>
<constraint ref="custom:Produktformate" />
</constraints>
</property>
<!– Ressourcenliste Abhängig vom Kunden –>
<property name="custom:ARessource">
<title>Ressource</title>
<type>d:text</type>
<multiple>true</multiple>
<constraints>
<constraint ref="custom:Ressourcen" />
</constraints>
</property>
</properties>
</aspect>
</aspects>
</model>
08-31-2009 04:00 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.