Question

Freedom UI - Best Practice for Uploading Multiple Required and Optional Documents

Hi everyone,

I'm working on a Freedom UI application where users need to upload multiple documents. Some documents are mandatory, while others are optional.

I initially tried adding a File field from the data model and placing it on the page, but it doesn't appear in the Freedom UI designer or at runtime.

What is the recommended approach in Creatio for this scenario?

My requirements are:

  • Allow users to upload multiple documents.
  • Some document types should be mandatory and others optional.
  • Ideally, each uploaded document should have related information, such as a Document Type (and possibly other metadata).

Any guidance or examples would be greatly appreciated. Thank you!

Like 1

Like

2 comments

Hi Olivia, 

for existing/core objects, Attachments are stored in the #Object#File Table, e.g. for Accounts in the AccountFile Table. For Custom Objects the SysFile Table is used iirc. Those tables contain all metadata as well as the actual File Data. 

To enfore storing at least 1, a maximum of 2, or only documents of a certain type you can create a custom Process that gets initiated by event triggers like "Record added" to e.g. the AccountFile Object. 

Then you can Read corresponding data from this newly added record, and set certain values in other fields based on it, e.g. set a  "ContainsAttachment" boolean value on your Account record page to 'true' in order to trigger other Frontend logic. 

Just keep in mind that for a "Record deleted" Trigger you have to turn off "Run following elements in the background" for that process path, as otherwise you won't be able to Read the Data of the record to be deleted before the deletion is performed by the system - you would only be able to get NULL values from the "Read Data" Process Element

Best, 
David

Hello,

As David mentioned, documents are usually stored in dedicated tables, where you can also store metadata, type, etc.Regarding mandatory and optional documents, I believe that in this situation you need to track already uploaded files by checking the content of these tables. If a mandatory file is missing, the system should notify the user accordingly.

Show all comments