1. Script object OG.DataRowFile

    Article: AN0002163Updated: 24.02.2020

    This object offers functions for reading and deleting files at records.

    Script functions

    Name Description
    DataRowFileList GetFileInfo(int classDefId, int columnClassDefId, int dataRowId) Function returns information about files attached to the given record and column.
    DataRowFileList GetFileInfo(int classDefId, int columnClassDefId, int dataRowId, bool onlyActive) Function returns information about files attached to the given record and column but only for undeleted files.
    byte[] GetFileContent(int id, int classDefId) Function returns file content.
    void Delete(int id, int classDefId) Method deletes the input file. The deletion follows column settings.
    int MaxFileSize Maximal file size. It is valid for the whole ObjectGears instance.
    void Copy(int sourceFileId, int sourceClassDefId, int destColumnClassDefId, int destDataRowId) Method copies the file from one record to another.
    void Move(int sourceFileId, int sourceClassDefId, int destColumnClassDefId, int destDataRowId) Method moves the file from one record to another.

     

    Parameters of methods Copy and Move

    Name Description
    sourceFileId Id of the file.
    sourceClassDefId Id of the source class.
    destColumnClassDefId Id of the target column of type File.
    destDataRowId Id of the target record. It has to be from the class according to the parameter destClassDefId.

    Object call

    OG.DataRowFile

×