Write Vertec activity values as metadata in SharePoint
Product line
Standard
|Expert
Operating mode
CLOUD ABO
|ON-PREMISES
Modules
Services & CRM
Budget & Phases
Purchases
Resource Planning
Business Intelligence
Starting with Vertec 6.4.0.10, the activity is passed as an object with the StoreDocument method. However, metadata is only written if the extension is extended accordingly.
For metadata to be written, the used DMS interface must be overwritten or supplemented as follows. The example refers to the standard Sharepoint online dms extension .
A Scripting is created with the following text:
import DmsSharePoint class MyDmsSharePointExtension(DmsSharePoint.DmsSharePointExtension): __doc__ = "Erweiterung DMS-Extension mit Metadaten" # pass # Override this method in a subclass to be able to define meta data during document upload. # This method is called by Vertec for each document that is uploaded. If the returned # dictionary contains entries, Vertec interprets the keys as site column name and the values # as site column value and writes meta data accordingly during document upload. def getMetaDataDict(self, vertecFilePath, content, aktivitaet): self.Log("getMetaDataDict(...)" + (" with aktivitaet" if aktivitaet else " without aktivitaet")) # override the extension and uncomment this line to activate the meta data example return self.getExampleMetaDataDict(vertecFilePath, content, aktivitaet) # empty dict => Vertec does not try to write meta data to SharePoint return dict()
This activates the getExampleMetaDataDict
method, which is in the default interface and returns sample metadata. You can find the corresponding code in the default interface:
The submitted fields must match the metadata schema of your SharePoint. This method will therefore also be overridden in the script generated above:
def getExampleMetaDataDict(vertecFilePath, content, aktivitaet):
or instead of the following row
return self.getExampleMetaDataDict(vertecFilePath, content, aktivitaet)
directly returned the corresponding values.
Then an extension entry is created with <Name des Scripts>.<Name der Methode> (described in the article Working with Extensions).
The standard Sharepoint Online DMS extension is then deactivated and the newly created one is installed.