Creating a link to the TIVITY File Class
Creating a link to the TIVITY File Class to add the ability to upload files to our tasks.
Last updated
Creating a link to the TIVITY File Class to add the ability to upload files to our tasks.
Last updated
To attach files to our tasks, we make use of the TIVITY File class, which originates from the Documents App. Each task item can have multiple files attached, but each file is related to only one task item, which we describe as One-To-Many relationship.
To be able to use the TIVITY File class in our app we need to add the TIVITY File class to our application. For this, go to General > Classes Tab and select the class TIVITY File.
Now we can link the TIVITY File class to the class we previously created. We go back to Classes, expand our class and expand Links and select TIVITY File and click the plus icon➕.
On the next window in the Common Tab, we need to set the Field for the Tivity File to Instance (Ref) and the link between the two classes is represented by YourClass.Id ↔ TIVITY File.Instance (Ref). Since we want the link to be bidirectional, we check Is Source for both classes.
In the Advanced Tab, we set the Controller as Default and the Type as OneToMany
With this part done, we can move on to the next chapter!