- Is it possible to use API to start existing configured scheduled export job?
- If above is not possible, how to destroy the object after content is exported? Below setting (MFExportContentFlagDestroyAfterExport) is not working. Content is exported but files still exist in the vault.
Dim oExportContentJob As New MFilesAPI.ExportContentJob
oExportContentJob.ConfigurationID = "ExportArchive1"
oExportContentJob.TargetLocation = ExportFolder
oExportContentJob.UseSearchConditions = True
' Only export with property Can Archive = true
Dim oSCs As New MFilesAPI.SearchConditions
Dim oSC As New MFilesAPI.SearchCondition
oSC.ConditionType = MFilesAPI.MFConditionType.MFConditionTypeEqual
oSC.Expression.DataPropertyValuePropertyDef = oVault.PropertyDefOperations.GetPropertyDefIDByAlias("PD.CanArchive")
oSC.TypedValue.SetValue(MFilesAPI.MFDataType.MFDatatypeBoolean, True)
oSCs.Add(-1, oSC)
oExportContentJob.SearchConditions = oSCs
' Destroy after export
oExportContentJob.Flags = MFilesAPI.MFExportContentFlag.MFExportContentFlagDestroyAfterExport
oVault.ManagementOperations.ExportContent(oExportContentJob)