Hi sundaytwins.
Could you try to add these codes to cleanup objects?
Public Function uploadRequirement(TdConnection, reqPath, reqName, reqType, reqAuthor, Optional reqPriority) Dim reqFact,req parentID = getIdOfRequirement(TdConnection, reqPath) ''Returns the ID of the parent folder/requirement Set reqFact = TdConnection.ReqFactory Set req = reqFact.AddItem(Null) req.parentID = parentID req.TypeId = reqType req.name = reqName req.Author = reqAuthor If Not IsMissing(reqPriority) Then req.priority = reqPriority End If req.Post req.UnlockObject uploadRequirement = req.ID Set reqFact = nothing Set req = nothing End Function Function getIdOfRequirement(tdc, parentReqPath) Dim result,reqFact,reqList result = -1 Set reqFact = tdc.ReqFactory Set reqList = reqFact.NewList("") For i = 1 To reqList.Count If reqList(i).path = parentReqPath Then result = reqList(i).ID Exit For End If Next getIdOfRequirement = result set reqFact = nothing set reqList = nothing End Function
Br, Tomas