Problem about checking a file into CAD native file. thanks

オフライン
Hi Aras Team,
I am trying to send an local file(CheckInFile) into CAD Native file, however it looks every line in the following code works fine, but the "fileId"  value is not able to set into the CAD native_file property in the vault table in the end. Any ideas? Thanks vey much.
Dim MyDocItem As Aras.IOM.Item = MyInnovator.getItemByKeyedName("CAD", txtDocNumber.Text)
             
                Dim I As Integer = 1
                For I = 1 To CheckInFile.Length - 1
                    Dim MyFileItem As Aras.IOM.Item = MyInnovator.newItem("File", "add")
                  
                    MyFileItem.setFileName(CheckInFile(I))
                    MyFileItem = MyFileItem.apply()

                    Dim fileId As String = MyFileItem.getProperty("id")
                
                    MyDocItem.setProperty("viewable_file", fileId)
                                 
                Next
                ' execute "add"
                Dim MyResult As Aras.IOM.Item
                MyResult = MyDocItem.apply()
Best regards,
Jen Li
Parents Reply Children
No Data