mobile
file
Studio_Creatio
8.0

How to get file creation date in mobile application when downloading it from a gallery or from a file system?


Here is my code:

onFileTypePickerItemTap: function(el, index, target, record) {
    var source = record.get("Source");
    switch (source) {
        case Terrasoft.Configuration.FilesAndLinksDetailFileSources.Gallery:
            Terrasoft.Camera.captureFromGallery({
                success: this.onCameraCapture,
                failure: this.onFail,
                scope: this
            });
            break;
            ...
        }
    }
},

onCameraCapture: function(fileName, url) {

    Terrasoft.Mask.show({message: Terrasoft.LocalizableStrings.UploadingFile});
    if(fileName && url) {
        this.saveFile(fileName, url);
    } else {
        Terrasoft.Mask.hide();
    }
}

Like 0

Like

0 comments
Show all comments
attachments
attachment
file
file upload
Files
Studio_Creatio
8.0

Hi All, question please.

I want to "copy" or "duplicating" some attachment file(s) inside default feature from Creatio.

Based on document here :
https://academy.creatio.com/docs/user/bpm_tools/process_elements_reference/system_actions/process_file/process_file_element

We need to find source file with “Attachments and notes of the object”, but I can not find "Attachments and notes of the object" in my environment (Business Process).

Need advice please, thank you.

Note : Studio Creatio version : 8.3.4.2753

Like 0

Like

3 comments

Hello.

In the following dropdown, you need to search not for "Attachments and notes" of the object exactly, but for the object that specifically stores the files bound to your object. You can also find this in the Configuration section by searching using the template "your object" + "File" object, for example AccountFile, ActivityFile, and so on.

Alternatively, you can create your own object and inherit it from the SysFile object, and then use it within the process.

Best regards,
Antonii

Hi Antonii, thank you for your feedback.
1. I open Configuration section, and I can not find template that you mention above. Capture :

 

Actually this is my files :

2. Do you have any link or documentation about : Create own object and inherit it from the SysFile object?

Thank you, appreciate it Antonii.

Dedi Sadikin,

Here's the correct logic for the Process File element regarding the source object:

If your object already has its own dedicated file object (for example, AccountFile, CaseFile, and so on), you should select that object as the source in the Process File element.

If your object doesn't have a separate file object — which is the case for custom objects created in Freedom UI — you should specify the main object itself (your custom object) as the source. The Process File element resolves this internally and pulls the file data from SysFile behind the scenes. 

Thus, when you open the "How to filter records" step, the available filter fields belong to the "Uploaded file" object rather than your main object.

So for your case, you can go ahead and select your custom object directly as the source in the Process File element, and the filtering step will let you narrow it down by the relevant SysFile fields (such as the linked Record Id).

Let us know if you run into any issues setting this up.

Show all comments
TimeLine
file
customobject
Studio_Creatio
8.0

Hello,

I am currently working on Integrating my Custom Object Data on Time Line tab in Contact form page, I have followed this link to accomplish this .


Now I want to show the file attachment preview or a downloadable link in the timeline tab.


This is what I have tried:

  1. In my first try, I tried to save the files in separate object and add that object as lookup field in my custom object.
    1. Result: It shows the name of file only in timeline object
  2. In my second try, I directly introduced  a file datatype field in my custom object,
    1. Result : It shows the raw file content in preview.

Also, How can we change the visibility of this field as I only want to show it if it has any value. I am using an online instance.

Can any one guide me on how to do this?

Thanks in advance for your support!!

Like 0

Like

1 comments
Best reply

Hello,

Thank you for your message.

At the moment, displaying file previews or downloadable file links directly within the Timeline tab is not supported out of the box in Creatio. This functionality might require additional custom development.

Hope this will answer all your questions!

 

Hello,

Thank you for your message.

At the moment, displaying file previews or downloadable file links directly within the Timeline tab is not supported out of the box in Creatio. This functionality might require additional custom development.

Hope this will answer all your questions!

 

Show all comments
file
extention
restriction
Upload
Sales_Creatio

Hi Community,

I have a question.
Are there any restrictions regarding the file extensions that can be uploaded (in the latest Creatio version)?
Thank you in advance!
 

Like 0

Like

1 comments

Hello, 

you can check what extensions are allowed in your Creatio instance by going to System Settings - and checking the Deny and Allow Extensions Lists

 

There is more information regarding extensions on Academy withthe below link: 

 

https://academy.creatio.com/docs/8.x/setup-and-administration/administration/security-settings/secure-file-upload

 

Thank you for reaching out!

Show all comments
file
Studio_Creatio
8.0

Hi,

is there any documentation on how to use the File param type in a business process? I wasn't able to find any.

I have a use case where i have to save a file as an attachment to an entity, starting from a base64 rappresentation of the file. I would like to accomplish this task with the least amount of coding. What i envisioned is a business process with a script task that converts the base64 to a File param. Then a process file shape that saves the File param. Sadly i'm dead in the water on how to implement this scenario because i have no idea on how to use File param type. I can't even understand what .Net/Terrasoft type it is. Do you have any suggestion?

Like 0

Like

1 comments

Hello,

Please specify if you have checked the available basic functionality meant for processing files within business processes - the "Process File" element? If so, could you describe why exactly does this option not work for you?

https://academy.creatio.com/docs/8.x/no-code-customization/bpm-tools/pr…

Show all comments
file
Studio_Creatio
8.0

Hello;
In my 7.17 version i create a file repository override class and it work correctly
when I try to upgrade to 8,2,1 the FileService core class change and it create fileRepository object based on interface not class (ClassFactory.Get) and it run based method loadFile not override one.
Is it any solution to set the the default class for interface

Like 0

Like

5 comments

Hi,

Yes, starting from version 8.x, Creatio uses dependency injection (DI) more actively, including for services like IFileRepository, which is now resolved via ClassFactory.Get<IFileRepository>().

To override the default implementation, you can register your custom class as the default for the interface in the dependency container.
 

Solution: Register your class for the interface

You have to create your own AppEventListener and bind your class to the appropriate interface there.

 

public class UsrAppEventListener : AppEventListenerBase
{
	public override void OnAppStart(AppEventContext context) 	{
		base.OnAppStart(context);
		ClassFactory.Bind<IFileRepository, CustomFileRepository>(reuseType: ReuseType.Singleton);
    }
}

 

Where:

  • CustomFileRepository is your custom class that implements IFileRepository
  • ReuseType.Singleton (or None) depends on your usage

⚠️ Important: Ensure your class fully implements the IFileRepository interface.

This way, when FileService calls ClassFactory.Get<IFileRepository>(), it will receive your custom implementation.

TU Irina

Tomasz Branicki,

Hi Irina.
I finally manage to upgrate creatio properly so i can try your sollution.
write now i gut such error

Terrasoft.Core.InstanceActivationException
 HResult=0x80131600
 Message=Error creating an instance of the "Terrasoft.Configuration.IFileRepository" class
 Source=<Cannot evaluate the exception source>
 StackTrace:
<Cannot evaluate the exception stack trace>

 This exception was originally thrown at this call stack:
   [External Code]

Inner Exception 1:
ActivationException: Error activating IFileRepository
More than one matching bindings are available.
Matching bindings:
 1) binding from IFileRepository to FileRepository
 2) binding from IFileRepository to UsrFileRepository
Activation path:
 1) Request for IFileRepository

Suggestions:
 1) Ensure that you have defined a binding for IFileRepository only once.

My class is describe like that

    [Terrasoft.Core.Factories.Override]
   public class UsrFileRepository : FileRepository.

can you give me a hand :)

regards
Tomek

Iryna Oriyenko,

Hi Irina.
I finally manage to upgrate creatio properly so i can try your sollution.
write now i gut such error

Terrasoft.Core.InstanceActivationException
 HResult=0x80131600
 Message=Error creating an instance of the "Terrasoft.Configuration.IFileRepository" class
 Source=<Cannot evaluate the exception source>
 StackTrace:
<Cannot evaluate the exception stack trace>

 This exception was originally thrown at this call stack:
   [External Code]

Inner Exception 1:
ActivationException: Error activating IFileRepository
More than one matching bindings are available.
Matching bindings:
 1) binding from IFileRepository to FileRepository
 2) binding from IFileRepository to UsrFileRepository
Activation path:
 1) Request for IFileRepository

Suggestions:
 1) Ensure that you have defined a binding for IFileRepository only once.

My class is describe like that

    [Terrasoft.Core.Factories.Override]
   public class UsrFileRepository : FileRepository.

can you give me a hand :)

regards
Tomek

Iryna Oriyenko,

Hi Iryna;
I find solution
I used rebind except bind.
thank you for help

 

regards Tomek

Show all comments
file
file upload
FileApiService
Studio_Creatio
8.0

Hi Community,

 

I have a question regarding customization file storage in Creatio. Is it possible to save files directly in the file system instead of the database (default)? 

I came across documentation on "Implementing a custom file storage," but I'm unsure whether these customizations affect the location where files are stored, or if they only modify the file metadata.

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…

 

Additionally, is it possible to customize the format in which the file is saved? 

By default, files are saved as BLOBs (In Database). However, if we want to store files in the same format but directly in the file system rather than as BLOBs, would that be possible in Creatio?

Like 0

Like

1 comments
Best reply

Hello, 

The "Implementing a custom file storage" documentation you referenced utlines how to achieve this, and it does indeed allow you to change the location where files are stored. 

 

The process involves implementing a custom file storage system using file management API. Specifically, you can:

 

This interface defines how file content is stored and retrieved. By creating a custom class that implements this interface, you can direct to save files to a file system instead of the database. For example, you could write a class that saves files to a specified directory on the server’s file system.
 

After implementing the storage logic, you register it in SysFileContentStorage lookup, which tells the system to use your custom storage for file operations.


How to check:


 

You’ll also need a custom file locator (implementing IFileLocator) to specify where files are stored in the file system, and optionally a custom metadata storage (implementing IFileMetadataStorage) if you need to tweak how metadata is handled. 


Our documentation explains more about it: 

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/8.1/back-end-development/api-for-file-management/overview
https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/back-end-development/api-for-file-management/references/ifilecontentstorage
EntityFileLocator class | Creatio Academy

Regards,
Orkhan
 

Hello, 

The "Implementing a custom file storage" documentation you referenced utlines how to achieve this, and it does indeed allow you to change the location where files are stored. 

 

The process involves implementing a custom file storage system using file management API. Specifically, you can:

 

This interface defines how file content is stored and retrieved. By creating a custom class that implements this interface, you can direct to save files to a file system instead of the database. For example, you could write a class that saves files to a specified directory on the server’s file system.
 

After implementing the storage logic, you register it in SysFileContentStorage lookup, which tells the system to use your custom storage for file operations.


How to check:


 

You’ll also need a custom file locator (implementing IFileLocator) to specify where files are stored in the file system, and optionally a custom metadata storage (implementing IFileMetadataStorage) if you need to tweak how metadata is handled. 


Our documentation explains more about it: 

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/8.1/back-end-development/api-for-file-management/overview
https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/back-end-development/api-for-file-management/references/ifilecontentstorage
EntityFileLocator class | Creatio Academy

Regards,
Orkhan
 

Show all comments
attachments
attachment
file
Files
FilesAndLinks
file upload
FileApiService
Upload
Sales_Creatio
8.0

Hello, colleagues. After generating a report, it is necessary to attach it as a file to the record, in the Files and links detail. The application from "customerfx" is not suitable. Here, it is necessary to automatically select the report form by pressing one button, etc. 

I ask for your help. Perhaps there is somewhere to look at the code. Or you can point to an article in the Academy, or something else.
As a last resort, I will analyze the principle of operation of the application from Ryan (customerfx").
Thank you all.

Like 0

Like

2 comments
Best reply

Not sure if I completely understand, however, if you're wanting to generate a printable and attach to a record, you can do this with a process using the Process File element. This allows you to generate a printable and you can easily attach to a record's files. Then, just wire up the button to run the process. 

Ryan

Not sure if I completely understand, however, if you're wanting to generate a printable and attach to a record, you can do this with a process using the Process File element. This allows you to generate a printable and you can easily attach to a record's files. Then, just wire up the button to run the process. 

Ryan

Ryan Farley,

Thanks, Ryan. That's what I did. I wrote a business process for generating different reports depending on the value of the reference field and adding them to the attached files. In the module, I added a button to call this business process with the transfer of the necessary parameters to it.

Show all comments
Base64
file
bpm
API
Studio_Creatio
8.0

Hello

 

It is posible to save a file in creatio from a base64 string? I have a web service that allows me to request a document by an id to an external service and it responds with the document in a base64 string, so I would like to know if it is possible to convert that string into the file and save it in some record on the platform.

 

Thank you 

Like 0

Like

2 comments

Something like this should work:

var base64FileString = Get<string>("Base64File");
var accountId = Get<Guid>("AccountId");

var attachFileType = new Guid("529bc2f8-0ee0-df11-971b-001d60e938c6");
var fileName = "SomeFile.docx" // set proper file type in file name

var entity = UserConnection.EntitySchemaManager.GetInstanceByName("AccountFile");
var fileEntity = entity.CreateEntity(UserConnection);
fileEntity.SetDefColumnValues();
fileEntity.SetColumnValue("AccountId", accountId);
fileEntity.SetColumnValue("TypeId", attachFileType);
fileEntity.SetColumnValue("Name",fileName);
fileEntity.SetBytesValue("Data", Convert.FromBase64String(base64FileString));
fileEntity.Save();

Ryan

Ryan Farley,

Thank you very much 

Show all comments
studio
8.1.3
API
file
storage

Hello,

 

I'm trying to implement a file storage that saves files on a network share instead of the database. I followed the instructions here:  API for file management | Creatio Academy but I'm getting a Cannot be null Parameter name: service error. 

Any help will be appreciated. 

Thanks,

Jose

 

Like 0

Like

1 comments

Good day,

Based on the screenshots, an empty value appears to be passed to a method with the “service” argument. Unfortunately, there's not enough information available to pinpoint the exact cause of the error at this time.
 

To further investigate, it would be necessary to debug and examine what the service returns in the browser console, identify what service it is, and review the function call stack.
 

These issues typically fall under the scope of a development consultation for a deeper investigation. 

If needed, you may want to discuss this with your manager to arrange a consultation.

Thank you!

Show all comments