AaDocument Model

From Plex-XML
Jump to: navigation, search

The Document-Model could be used for:

  • File-Upload
  • Document filing
  • HTML-Link filing
  • Assignment of documents/links and records (eg. you can easily assign documents to a contact person or an invoice and show/link them on a tab)
  • Letter and document generation from templates, boilerplates and a HTML rich-text-editor

Contents

File Upload

File uploads are not stored in the Web-Path so any access is fully protected by the security system. For the storage any valid path in your file system can be defined for each file type in the "DocumentType" entity. If you like to embed, show or download a file via HTML it can be done with the DocFileShow request or you could build your own request with the API's.

FileUpload.png

File Upload WEB-Path

Unlike the normal file upload this file upload stores the files in the Web-Path. So any file could be accessed without restrictions. For every new file that is uploaded an unique name is generated. So you need to take care for that if you like to replace a file. On the other hand you don't have to take care if you upload different files with the same name.

The storage path can be defined as 'UNPROTECTED' type in the "DocumentType" entity. Beneath the default path e.g. 'C:\Java\Tomcat60\webapps\security\' you need to define the web path e.g. 'images\unprotectd\'.

Be aware that any file in the WEB-Path directory will be deleted if you undeploy and redeploy your application on your tomcat server.

FileUploadWeb.png

Document Types

The Document Type entity defines storage path, web path (for web file upload) and mime type for file types.

Document types are automatically created while you upload an unknown file type. Default values for each new type are taken from the STANDARD type.

Be aware of the different usage of / and \ on Linux and Windows systems.

DocumentTypes.png

Document Letter Templates

Template Fields

Content from the Document-Fields entity that could be used as a field in an Open-Office template:

  • Address -->recipient address
  • AuthorName
  • AuthorPhone
  • AuthorFax
  • AuthorMail
  • AuthorMobile
  • AuthorDepartment
  • AuthorDictate
  • AuthorShopName
  • Date -->date converted to the format of the document language
  • DateLong -->long date converted to the format of the document language
  • DocNumber -->unique number of the document
  • DocText -->main text of the document 40.000 character long
  • OurSign
  • YourSign
  • Reserve1 -->reserve field 1.000 char long
  • Reserve2 -->reserve field 1.000 char long
  • Reserve3 -->reserve field 1.000 char long
  • Reserve4 -->reserve field 1.000 char long
  • Reserve5 -->reserve field 1.000 char long


Each field could be placed free in the template. If you like to add a field in Open-Office-Writer open a document and use:

  • in German: Einfügen -> Feldbefehl -> Andere... -> Tab 'Variablen' -> Benutzerfeld -> field als Namen und Wert eingeben -> Einfügen
  • in English: ...who has an English installation?...

Boilerplates

DocumentTextTemplate entity...

Content from the Document-Fields entity that could be used as placeholder in text-templates. You need to use the cryptic 6 character field implementation names here because we use meta-code for the replace process.

  • {*info} -> Lists all available fields with name and value.(Security issue?)
  • {DateFr} -> Date from
  • {DOFUNA} -> Author Name
  • {DOFUFX} -> Author Fax
  • {DOFUFO} -> Author Phone
  • {DOFUMO} -> Author Mobile
  • {DOFUMA} -> Author Mail
  • {DOFDIC} -> Author Dictate
  • {DOFDEP} -> Author Department
  • {DOFSHP} -> Shop Name
  • {DOFETI} -> Address
  • {DOFETN} -> Name part of address
  • {DOFANB} -> Salutation
  • {DOFID} -> Unique document identifier
  • {DOFR01} -> Reserve 1.000 char
  • {DOFR02} -> Reserve 1.000 char
  • {DOFR03} -> Reserve 1.000 char
  • {DOFR04} -> Reserve 1.000 char
  • {DOFR05} -> Reserve 1.000 char


If you like to use field content from another entity e.g. an invoice you need to:

  1. Create a new function in you Plex-XML modell. E.g. Invoice.XML_Intern.ExtraServices.ReplaceTextEditorFields is a Plex-XML_A/aaDoc_ReplaceLinkShell.
  2. Customize the two edit points that are mentioned in the description.
  3. Register the function in the customized.xslt at the "DocGetEntityLinks" webrequest.
  4. Put the fields in the text template e.g. {InvioceID}.
  5. Make sure that the documents are linked to your invoice.

Example

{DOFANB},

concerning our invoice {InvioceID} ...

Best regards
{DOFUNA}
{DOFSHP}
Personal tools