cancel
Showing results for 
Search instead for 
Did you mean: 

Force user to edit metadata on upload

sharifu
Confirmed Champ
Confirmed Champ
I would like to force users to enter metadata once they upload their doc on the share.

how would I achieve the metadata to open automatically for users who use the browser and upload a file manually?
12 REPLIES 12

sharifu
Confirmed Champ
Confirmed Champ

<?xml version="1.0" encoding="UTF-8"?>

<!– Custom Model –>

<!– Note: This model is pre-configured to load at startup of the Repository.
   So, all custom –>
<!– types and aspects added here will automatically be registered –>

<model name="sp:domainmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <!– Optional meta-data about the model –>
   <description>domain Custom Model</description>
   <author></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>

   <namespaces>
      <!– Define a Namespace for my new definitions –>
      <namespace uri="sp.new.model" prefix="sp" />
   </namespaces>

   <constraints>
      <constraint name="sp:location" type="LIST">
         <parameter name="allowedValues">
            <list>
               <value></value>
               <value>UK</value>
               <value>USA</value>
            </list>
         </parameter>
      </constraint>
   </constraints>

   <!– Type and Aspect definitions go here –>
   <types>
      <type name="sp:contract">
         <title>domain Contract Document</title>
         <parent>cm:content</parent>
         <!– <properties> <property name="sp:thirdParties"> <title>Third Parties</title>
            <type>d:text</type> </property> <property name="sp:responsibleEmp"> <title>Resposible
            Employee</title> <type>d:text</type> </property> <property name="sp:effectiveDate">
            <title>Effective Date</title> <type>d:date</type> </property> <property name="sp:expiryDate">
            <title>Expiry Date</title> <type>d:date</type> </property> </properties> –>
      </type>
      <type name="sp:finance">
         <title>domain Finance Document</title>
         <parent>sp:contract</parent>
      </type>
      <type name="sp:annualreturn">
         <title>domain Annual Return Document</title>
         <parent>sp:finance</parent>
      </type>
      <type name="sp:bonds">
         <title>domain Bonds and Garantees Document</title>
         <parent>sp:finance</parent>
      </type>
      <type name="sp:invoice">
         <title>domain Invoice</title>
         <parent>sp:finance</parent>
      </type>
   </types>

   <aspects>
      <aspect name="sp:contractFields">
         <title>Contract Meta Data</title>
         <properties>
            <property name="sp:thirdParties">
               <title>Third Parties</title>
               <type>d:text</type>
               <index enabled="true">
                  <atomic>true</atomic>
                  <stored>true</stored>
                  <tokenised>true</tokenised>
               </index>
            </property>
            <property name="sp:location">
               <title>Location</title>
               <type>d:text</type>
               <index enabled="true">
                  <atomic>true</atomic>
                  <stored>true</stored>
                  <tokenised>true</tokenised>
               </index>
               <constraints>
                  <constraint ref="sp:location" />
               </constraints>
            </property>
            <property name="sp:responsibleEmp">
               <title>Responsible domain Employee</title>
               <type>d:text</type>
               <index enabled="true">
                  <atomic>true</atomic>
                  <stored>true</stored>
                  <tokenised>true</tokenised>
               </index>
            </property>
            <property name="sp:contractRef">
               <title>Internal Reference</title>
               <type>d:text</type>
               <index enabled="true">
                  <atomic>true</atomic>
                  <stored>true</stored>
                  <tokenised>true</tokenised>
               </index>
            </property>
            <property name="sp:logNumber">
               <title>Log Number</title>
               <type>d:text</type>
               <index enabled="true">
                  <atomic>true</atomic>
                  <stored>true</stored>
                  <tokenised>true</tokenised>
               </index>
            </property>
            <property name="sp:effectiveDate">
               <title>Effective Date</title>
               <type>d:date</type>
               <index enabled="true">
                  <atomic>true</atomic>
                  <stored>true</stored>
                  <tokenised>true</tokenised>
               </index>
            </property>
            <property name="sp:expiryDate">
               <title>Expiry Date</title>
               <type>d:date</type>
               <index enabled="true">
                  <atomic>true</atomic>
                  <stored>true</stored>
                  <tokenised>true</tokenised>
               </index>
            </property>
         </properties>
      </aspect>


      <aspect name="sp:financeFields">
         <title>Finance Meta Data</title>
         <properties>
            <property name="sp:value">
               <title>Value</title>
               <type>d:text</type>
               <index enabled="true">
                  <atomic>true</atomic>
                  <stored>true</stored>
                  <tokenised>true</tokenised>
               </index>
            </property>
         </properties>
      </aspect>

      <aspect name="sp:annualreturnFields">
         <title>Annual Return Meta Data</title>
         <properties>
         </properties>
      </aspect>

      <aspect name="sp:bondsFields">
         <title>Bonds Meta Data</title>
         <properties>
            <property name="sp:refNo">
               <title>Reference Number (optional)</title>
               <type>d:text</type>
               <index enabled="true">
                  <atomic>true</atomic>
                  <stored>true</stored>
                  <tokenised>true</tokenised>
               </index>
            </property>
         </properties>
      </aspect>

      <aspect name="sp:invoiceFields">
         <title>Invoice Meta Data</title>
         <properties>
            <property name="sp:invoiceNo">
               <title>Invoice Number</title>
               <type>d:text</type>
               <index enabled="true">
                  <atomic>true</atomic>
                  <stored>true</stored>
                  <tokenised>true</tokenised>
               </index>
            </property>
         </properties>
      </aspect>

   </aspects>

</model>

guilherme_souza
Champ in-the-making
Champ in-the-making
Try put this in upload.post.js

var tparty = args["sp:thirdParties"];

edibortoletto
Champ in-the-making
Champ in-the-making
Guilherme, fiz os passos que vc postou e não grava a informação. Você tem pode mandar o exemplo por email ou dar alguma ideia de onde eu posso conferir se fiz certo?