File API (GetFileFactory, EntityFileLocator) Not Working in Process ScriptTask - Compilation Errors

Hello  Team,

We are facing an issue while trying to use the File API inside a Process ScriptTask and would like your clarification.

According to the Creatio Academy documentation (File API overview), it is possible to work with files using the following approach:

 

IFileFactory fileFactory = UserConnection.GetFileFactory(); var fileLocator = new EntityFileLocator("SysFile", recordId); IFile file = fileFactory.Get(fileLocator);

 

However, when implementing this logic inside a ScriptTask of a business process, the code does not compile, and we receive the following errors:

  • 'UserConnection' does not contain a definition for 'GetFileFactory'
  • The type or namespace name 'EntityFileLocator' does not exist in the namespace 'Terrasoft.File.Abstractions'

This suggests that:

  • GetFileFactory() is not available in Process ScriptTasks
  • EntityFileLocator is not accessible in the process execution context

Our goal is to:

  • Read the content of an existing file (e.g. from SysFile or a custom *File entity)

Could you please confirm:

  1. Whether the File API (IFileFactory, EntityFileLocator, IFile) is officially supported inside Process ScriptTasks
  2. If not supported, what is the recommended and supported way to read an existing file and reuse its content inside a process

Thank you in advance for your support and clarification.

Like 0

Like

0 comments
Show all comments