Possible to remove workflow from object with script?

Hi All,

I have class configured for files uploaded from Hubshare that automatically has a Workflow configured and assigns a task to admin to review and file the document correctly. 

Part of this filing would be to change the class to the correct type, after which my workflow is irrelevant. 

Is there any method that that I can use to remove the workflow from these documents when their class is changed? I've investigated some scripting, but to no avail.

Parents
  • This will do it for you:

    Option Explicit
    'clear State
    Dim oStProperty : set oStProperty = CreateObject("MFilesAPI.PropertyValue")
    oStProperty.PropertyDef = 39
    oStProperty.TypedValue.SetValue MFDataTypeLookup, Null
    Vault.ObjectPropertyOperations.SetProperty ObjVer, oStProperty
    'clear WF
    Dim oWFProperty : set oWFProperty = CreateObject("MFilesAPI.PropertyValue")
    oWFProperty.PropertyDef = 38
    oWFProperty.TypedValue.SetValue MFDataTypeLookup, Null
    Vault.ObjectPropertyOperations.SetProperty ObjVer, oWFProperty

Reply
  • This will do it for you:

    Option Explicit
    'clear State
    Dim oStProperty : set oStProperty = CreateObject("MFilesAPI.PropertyValue")
    oStProperty.PropertyDef = 39
    oStProperty.TypedValue.SetValue MFDataTypeLookup, Null
    Vault.ObjectPropertyOperations.SetProperty ObjVer, oStProperty
    'clear WF
    Dim oWFProperty : set oWFProperty = CreateObject("MFilesAPI.PropertyValue")
    oWFProperty.PropertyDef = 38
    oWFProperty.TypedValue.SetValue MFDataTypeLookup, Null
    Vault.ObjectPropertyOperations.SetProperty ObjVer, oWFProperty

Children
No Data