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

Hi Community!

 

I need to display existing documents from other sections together with the directly attached documents in FreedomUI 8.1.

 

The attachments are stored in the table "SysFile", which has a column called "TypeId". That lookup has the values "File" (default), "Link" and "Link to object".

 

I have tried to tinker around with the database of my on-premise dev environment. While I could manage to display inserted documents of type "Link", they won't open because the SysFile-table has no columns for referencing other documents.

 

There is also a table called "FileLink", which looks promising because it has the columns "FileSchemaName", "FileRecordId", "RecordSchemaName", "RecordId". That would be enough to link existing documents to various records, but the don't show up in the FreedomUi AttachmentList component.

 

Did anyone already manage to do this without duplicating documents?

 

Any help is much appreciated, thanks!

Robert

Like 2

Like

1 comments

Hi Robert!

 

Unfortunately, displaying the various sections' attachments together in one attachment component is impossible. However, you can use a separate attachment component for each section.

 

To implement this, we recommend the following steps:

1.  Open the Page Designer.

2.  For each section that you would like to display the attachments from:

- add the dropdown field, specifying this section as “Lookup” in the field’s general settings (or make sure that such a dropdown field already exists);

- add the attachment component.

3. In each added attachment component, set “Record to attach files” (general settings) to a value from the previously added dropdown field and “File storage location” (advanced settings) to the corresponding table.

 

After you choose the exact records in the dropdown fields, they will be linked to the current record, and you will see their attachments in the corresponding components. It will help you to avoid duplicating documents.

 

Best regards,

Natalia

Show all comments

Hi ,

 

What is the functionality behind the file size update in FileDetailV2. Where is exactly the uploaded file is stored and how can we access the file properties using webservice or esq?

Like 0

Like

1 comments

Hi Anupama,

 

From the client side the chain is as follows: upload method from the FileDetailV2 module then calls the upload method from the ConfigurationFileApi module. This ConfigurationFileApi module upload  method triggers the server side UploadFile method from the FileApiService class that uses the FileRepository class that uses the FileUploader class UploadFile method (that calls the UploadInternal method (with additional validations) and finally uses the Upload method to upload the file). So the upload on the server side is performed using the Upload method from the FileUploader class.

 

To locate the place where the file should be uploaded the FileUploader upload method uses the EntityFileLocator method that uses the fileUploadConfig (that is an object formed from the client-side when the ConfigurationFileApi module upload  method is called). For example if you are loading a file to the Contacts section the object to which the file will be saved is called ContactFile (and it can be also found in the database and configurations).

 

Best regards,

Oscar

Show all comments

Hi Team,



I would like to perform validation before deleting an attachment in the "Attachment and Notes" detail in the Opportunity Section.



Validation Requirement:

Step 1: A User (ex., Supervisor) is logging in and adding an attachment to the Opportunity record.



 

Step 2: On click of delete, there needs to be validation whether the user is in the same session on which the record is added, if he loggs out and logged in and tries to delete, it should not allow the user to delete, though the same user the session is different.

 

 

Note: 

1.A user Logged in

2.A session ID is created for the user

3.User Adding an attachment to opportunity record

4.User tries to delete the record in same session (allows to delete)

5.Same User logs out and login, then tries to delete the attachment he added previously, now the attachment should not be deleted.



I Debugged to find out the below things,

Schema for Attachment & Notes : FileDetailV2

User & Session Table : SysUserSession

Delete method: onDeleted: function(record) in FileDetailV2 schema



please guide me to achieve the required validation

 



Regards,

Bhoobalan P.

Like 0

Like

4 comments

Hi Bhoobalan,

 

The only possible way I see here is to create a database trigger that would be triggered upon each user session start that would delete all records related to the system user rights from the SysAccountFileRight table (record permissions for the AccountFile object should be enabled for this table to appear in the database) (only for records that were created in the past day so not to provoke high SQL-server CPU consumption). Also please note that theoretically you should also add denying access rights for the system user in the SysAccountFileRight table for all the attachments created in the past two or one day.

 

Best regards.

Oscar

Oscar Dylan,

Thanks for the response.



Here, I would like to perform the delete operation only on the attachment record that I select which should be in the same session of a user when the attachment was added (not all records).



Also, I couldn't find the table SysAccountFileRight.



Note: Validation should be performed only with the click of delete.







Regards,

Bhoobalan P

Bhoobalan Palanivelu,

 

Please double-check my previous reply: record permissions for the AccountFile object should be enabled for this table to appear in the database.

 

The database trigger will do the task you need, there is no need to develop some client logic (also it will be a very difficult task to check the user session, compare it to the file creation date and then pass this information to the validator using the client logic).

 

Best regards,

Oscar

Bhoobalan Palanivelu,



Regarding the link between attachments & user sessions - 



I do not think there is a track between the Attachment record and the session it was created in. The closest you can get to it is use the CreatedOn timestamp from the Attachment table and read SysUserSession table for any sessions in that range.



Another thing to be kept in mind is that -  A user can create multiple sessions at a time and logging out only closes that specific session leaving the remaining sessions active. Additionally, physical act of logging out is different from user session expiry. Later can happen automatically as well without any user action.



So some kind of approximation/change in the logic you have mentioned will need to be done Eg 'No active user session exists with session start time < Attachment's createdOn time stamp' is possible to check. But there is no guarantee that the exact session used to add the attachment was closed - given a multi session scenario. 

Show all comments

Hello,

Is there any way to enable the user to download all attachments for a record as a packaged ZIP file? I have see other programs with the feature like "Download as ZIP" where it will take multiple files and zip them in a single file for download for the user.

Like 1

Like

1 comments

Hi Reid! 

We recently uploaded an application to the marketplace 

that allows you to download all the files of a section, example of an 

account, in a ZIP file. 

Check it here: https://marketplace.creatio.com/app/download-zip-button-creatio

Thank you

Regards

Show all comments

How do I get the link to an attachment file using system actions? If I hover over the link to the file in the attachment detail of the record, I get something like https:///0/rest/FileService/GetFile/.  The GUID doesn't match the attachment record ID. How do I get the link or ID of the file from the attachment record to send the link to someone else?

Like 0

Like

8 comments

To achieve your target you need to create a link that is a sum of:

https://<instance>/0/rest/FileService/GetFile/

+

UID value from SysSchema table for the detail from which you try to get file from: OrderFile, InvoiceFile, AccountFile etc

+

ID value from the table which represents this detail.

For example I have a record in OrderFile table (order attachment) with an ID: 2AC7AA00-2E61-4AEC-8BD0-621269731DAA. To complete the link I execute:

SELECT UID FROM SysSchema WHERE Name = 'OrderFile'

and get a value of D75D815B-0B2E-4E33-973A-ED9A43601B44. So my link is:

https://<instance>/0/rest/FileService/GetFile/D75D815B-0B2E-4E33-973A-ED9A43601B44/2AC7AA00-2E61-4AEC-8BD0-621269731DAA

Please note that user that doesn't have active session in https://<instance> won't be able to download the file.

Oscar Dylan,

How do I set the system actions to that I have a process like this:

Janine White,

It is impossible to do using the process on the screenshot. You need to add an auto-generated page where you can specify file name and schema name, after that this process should read this file and schema parameters (there should be several conditional flows for different schema names). Also you need to create a lookup with all schema names so to be able to choose from lookup in this auto-generated page from the first step. Then there should be "Read data" element that reads "Schema" object so to get UID of the schema specified on the auto-generated page that we've added previously. After that the formula element should create a link for the string parameter (using the logic I've described previously) that will be used in the final auto-generated page element where this string parameter value will be placed. Feel free to use our official documentation on business process design to achieve your business task.

Oscar Dylan,

I can read the file name from the attachment record, which is available in a parameter, and I know the attachment section, "bpm'online Environments attachments".  Why would I need to select anything manually?  I know how to set up business processes in general and use Read data elements as I've done that hundreds of times. I just don't understand how to identify the Schema and UID from the attachment record from the instructions above.  When I use the following read data, the UID is returned as zeros, clearly missing. The link in the process ends up being, "https://dev-katerra.bpmonline.com/0/rest/FileService/GetFile/00000000-0…" where "abe00c37-67f4-413c-93a0-1fa4af899bdc" is the Id of the attachment.

Nevermind, I figured out that the UID is in the link for existing files, so, I don't need to look it up.  I'll just copy it from there.

Oscar Dylan,

 There is a way to preview the file in the browser if there is a image? What format is returning the method to the client?

 

this  works to show the attachment in the browser.

var endpoint = "https://"+window.location.hostname+"/0/rest/FileService/GetFile/7661a363-68f6-4c26-879c-0590c22b963a/" + responseCollection.collection.items[0].$Id;
 
 
 
fetch(endpoint)
  //                         vvvv
  .then(response =&gt; response.blob())
  .then(imageBlob =&gt; {
      // Then create a local URL for that image and print it 
      const imageObjectURL = URL.createObjectURL(imageBlob);
      console.log(imageObjectURL);
  });

 

Racheli Gins,

 

It's because these UIds are not stored in the module structure:

If you need this logic to work in classic UI you need to hardcode the values as constants in your code.

Show all comments

bpm'online community,

How to create a custom editing page for details Files?

I need to change the value of custom lookup depending on the type of document.

 

I've already added all the necessary fields to the object "UsrProjetsFile".

I don't know which scheme to change to insert the fields into the editing page, which is opened by double-clicking on the details record File.

Could you please help with this issue.

Thanks!

Like 0

Like

2 comments

Hi Mariia,

 

Did you figure out on how to change this?

I am looking for the solution as well.

 

Thank you in advance!

 

 

Kind regards,

Yosef

Hello Yosef,

 

Yes, we have found a solution. It was simple for our case.



Firstly, you need to add the necessary column to the [Section]File object, where [Section] is the name of your section in which the detail files are placed (In my example the column with type lookup names "Nature").

Then you create a "Replacing Client Module" where the parent schema is LinkPageV2 ( UIv2 ).

And then you create your column in the diff part:

define("LinkPageV2", ["terrasoft", "BusinessRuleModule", "ext-base", "sandbox", "ConfigurationConstants"],
function(Terrasoft, BusinessRuleModule, Ext, sandbox, ConfigurationConstants) {
	return {
		methods: {},
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "insert",
				"parentName": "LinkPageGeneralBlock",
				"propertyName": "items",
				"name": "Nature",
				"values": {
					"bindTo": "Nature",
					"layout": {
						"column": 12,
						"row": 0,
						"colSpan": 12
					}
				}
			},
		]/**SCHEMA_DIFF*/
	};
});

That's it)

 

Best regards,

Mariia

 

Show all comments

The command of "Aplana. Business solutions" presents a new file manager for bpm'online.

New features of the add-on include:

  • add the file manager module to the page of any system partition using the page editor;
  • managing the file directory and setting access rights to it;
  • download, move and delete one file, and collect files in one click;
  • configuring the file store type with the local server or database;
  • storage of multiple versions of files;
  • view image files in the window directly on the page by double-clicking;
  • adding to the archive and unpacking the zip-archive;
  • playback of audio files;
  • playback of video files;
  • control access to file directories.

For more information please visit the bpm'online marketplace: https://marketplace.bpmonline.com/app/file-manager-bpmonline

Like 0

Like

Share

0 comments
Show all comments

Hi community!

How are you?

How can I replicate the same functionality that exists under the tab "Files and Links" of "Cases" in another custom entity?

I created the object detail "UpriArchivosIntervenciones" that inherits from "Files (Base)",  and I add ed a field called "UpriIntervención".



But after creating the detail using the wizard and adding it in "Intervenciones" entity, the detail configuration is not similar to the case. I observed that in CasePage, the schemaDetail for "Files and Links"" es FileDetailV2

King Regards,

 

Ezequiel

Like 0

Like

1 comments

Dear Ezequiel,

The addition of the attachments detail is described in the article below:

https://academy.bpmonline.com/documents/technic-sdk/7-12/adding-attachments-detail

The Notes part is a rich text field, however, you can simply check how it is implemented on a page and replicate it.

Warm regards,

Matt

Show all comments