I have search the forum and have managed to covert VB to VBScript but i still cant get the following to work. I am being held up on the final line of code which creates the object with a Type Mismatch Error.
Can someone please help.
here is my code;
Option Explicit
Dim oClass: Set oClass = CreateObject("MFilesAPI.PropertyValue")
Dim oName: Set oName = CreateObject("MFilesAPI.PropertyValue")
Dim oPropValsNew: Set oPropValsNew = CreateObject("MFilesAPI.PropertyValues")
'Set Name
oName.PropertyDef = MFBuiltInPropertyDefNameOrTitle
oName.TypedValue.SetValue MFDatatypeText, "Test"
oPropValsNew.Add -1, oName
'Set Class
oClass.PropertyDef = MFBuiltInPropertyDefClass
oClass.TypedValue.SetValue MFDatatypeLookup, 0
oPropValsNew.Add -1, oClass
vault.ObjectOperations.CreateNewObject 0, oPropValsNew