This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Create New Assignment - Workflow Script

I am trying to create a new assignment via a script and it keeps telling me that I have a type mismatch when creating the assignment:

Dim newValue : Set newValue = CreateObject("MFilesAPI.TypedValue")
newvalue.SetValue MFDatatypeLookup, 104
Dim MyRecordSet : set MyRecordSet = CreateObject("ADODB.RecordSet")
MyRecordSet.Open SelectStatement, oConnection

Vault.ObjectOperations.CreateNewAssignment "Part " & MyRecordSet.Fields(3) & " Revision " & MyRecordSet.Fields(4) & " Assembly Update", "Please Update the assembly for " & MyRecordSet.Fields(0) & " Revision " & MyRecordSet.Fields(1) & ". The Assembly needs to be updated because the current revision was end dated.", newvalue