Hello,
I added an object based on the File object, but I can't see the newly created object in the list of file storage locations. What could I be doing wrong?
Like
Hello,
For custom sections the files will be stored in SysFile object.
Hello,
When a new attachment storage is created according to The File Management API. The file storage will be available in the list of objects the Freedom UI Attachments component works with.
Hey, you need to name your obejct inherited from File to have suffix *File. Ex MyObjectFile. Inside that you must have column named MyObject (the one without File prefix) with lookup type as a link to you section object. After that it will appear in the list.
Here is how they got it:
private readonly string _fileSchemaName = "File";
...
recordSchemaName = fileSchemaName.EndsWith(_fileSchemaName)
? fileSchemaName.Substring(0, fileSchemaName.Length - _fileSchemaName.Length)
: fileSchemaName.StartsWith(_fileSchemaName)
? fileSchemaName.Substring(_fileSchemaName.Length)
: fileSchemaName;
columnName = $"{recordSchemaName}Id";
In addition to what Dmytro said, set the parent of your custom file object as "File"
- Name of object: [RelatedObjectName]File, for example UsrMyObjectFile for a file object for UsrMyObject
- Parent: File
- Add column: Lookup column to related object, named the same as the related object, for example add a lookup column UsrMyObject to lookup UsrMyObject
Ryan