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 Team, 

Is there a way to link the lookups . for instance if I select a lookup the other field should automatically show up ceratin fields. 

in cases, if I select products the related field (category) should show up the related fields of the product. is there a way to do it?

 

Thanks,

Gokul

 

Like 0

Like

1 comments

Hi Gokul,

Hope that guiding is suite for you.

Using filtration for lookup fields

Show all comments

I figured out how to get the link for an attachment, but when I include it in a Send email system action, the link is automatically converted to an attachment, which is undesirable because the attachment is too large.  How do I include a link to an attachment in an email and have it remain text or a hyperlink?

Like 0

Like

2 comments

Dear Janine, 

According to the [Send email] element logic, your hyperlinks to bpm'online attachments will be automatically converted to actual attached files in the email, there is no way you can leave them as text links.

Regards, 

Svetlana

S.Kobizka,

The really annoying part is even if I remove https:// it still converts.  I'll have to put in more space to make it unrecognizable.

Show all comments
  1. Get the Usr code of the field.
    1. Open the section wizard for the section.
    2. Double click on the field.
    3. Note the Name in DB of the field.
    4. Close the section wizard.
  2. Open the Schema for the edit page.
  3. Backup the current Schema by copying and pasting it to a Notepad file.
  4. Find the DIFF section of the insert operation for the Usr code of the field.
  5. If there is a labelCofig section, delete the content of labelConfig
    "labelConfig": {}
  6. Add a comma after "enabled": true
    "enabled": true,
  7. After enabled add:
    "showValueAsLink": true,
    "href": {
            "bindTo": "UsrCodeOfTheField",
            "bindConfig": {"converter": "getUsrCodeOfTheField"}
             },
    "controlConfig": {
             "className": "Terrasoft.TextEdit",
             "linkclick": { bindTo: "onUsrCodeOfTheFieldClick"}
             }

     

  8. In methods add:
    getUsrCodeOfTheField: function(value) {
       return {
           "url": value,
           "caption": value
       };
    },
    onUsrCodeOfTheFieldClick: function(url) {
       if (url != null) {
            window.open(url, "_blank", "height=" + this.get("WindowHeight") + ",width=" + this.get("WindowWidth"));
            return false;
       }
    }

     

  9. Click the Code Validation button to verify that there are no errors on the page.
  10. Click the Save button.

Refresh the edit page to see the field appear as link.

Like 2

Like

Share

5 comments

You can add mixins "CommunicationOptionsMixin" and update the field as following:

	{
	    "operation": "insert",
	    "name": "...",
	    "values": {
	        "layout": {
	            // ...
	        },
	        "bindTo": "UsrDocumentLink",
	        "className": "Terrasoft.BaseEdit",
	        "showValueAsLink": "true",
	        "href": {
	            "bindTo": "UsrDocumentLink",
	            "bindConfig": {
	                "converter": "getLinkValue"
	            }
	        },
	        "linkclick": {
	            "bindTo": "onOpenWindowClick"
	        }
	    }
	    //...
	}

 

If I want to have multiple string fields as hyperlinks, how do I do this in 'methods'? Do I add this whole section of code in again for the next field but replacing the 'UserCodeOfTheField with the 2nd string field name?

getUsrCodeOfTheField: function(value) {
   return {
       "url": value,
       "caption": value
   };
},
onUsrCodeOfTheFieldClick: function(url) {
   if (url != null) {
        window.open(url, "_blank", "height=" + this.get("WindowHeight") + ",width=" + this.get("WindowWidth"));
        return false;
   }
}

 

Julie cooper,

 

you need to add a separate method for the second string field and bind it to your second string field. So there should be 

getUsrCode1OfTheField

and

getUsrCode2OfTheField

as well as

 

onUsrCodeOfTheField1Click

and

onUsrCodeOfTheField2Click

methods and they should be bound to each string field accordingly.

 

Best regards,

Oscar

Oscar Dylan,

Hi ,

Here my doubt was in column setup its showing like a normal filed.How to setup same text filed as an hyperlink in column setup also.

 

Regards,

Praveen

Dear praveen n,

 

Unfortunately, there is no easy way to do the same it in the grid aside from using http/https (or other link-type strings like email, etc.) You can do it by extending or overriding class Terrasoft.Grid (you can find it in the web console, you won't be able to find it in configuration) and changing the method formatCellContent to call formatCellLink when you need it to aside from cases when it is called by default. You can debug method formatCellContent and see how it works in OOB version and create your own based on that. Unfortunately, we don't have examples of such implementation. 

Please see the following articles on how to override modules: 

https://community.creatio.com/questions/substitutionreplacing-modules

https://community.creatio.com/questions/change-task-displayed-fields

 

Best regards, 

Dennis 

Show all comments

How do I use the Add data System action to add a link in the Attachments of a section?

For example, I tried to add a link to an object being approved in the Katerra Approvals section to the Attachments of the Katerra Approvals record with the following setting and the link attachment was not created.

 

Like 0

Like

1 comments

Dear Janine,

Please change the type to "Link": [#Lookup.Attachment Type.Link#].

This will solve the issue.

Regards,

Anastasia

Show all comments
Question

Did the way that links are recognized in text fields change?  I though that previously, string fields that had URLs in them automatically became active links, but that's not the case now.  Was that moved to a configuration or setting in the newest version?

Like 0

Like

7 comments

Dear Janine,

There was no logic in the application that makes string fields clickable by default - they could be (and they are now in 7.14.0) clickable whne you put this string field into the list of columns displayed in the section (if you have http:// or https:// specified at the begining of this field).

I will create a request so they could create a logic that could activate link displaying for string fields values using section wizard on the edit page of the record. As for now please use this article https://community.bpmonline.com/articles/creating-custom-web-link-field so to make needed fields clickable.

Best regards,

Oscar

Although I have coded in Visual Studio .NET, I have done no development in bpm'online. How do I develop the diff property and add code to the methods property?

Janine White,

Janine in this case you need to contact your account manager and ask him/her to find a partner who could develop this logic for you.

Best regards,

Oscar

Here is another page describing how to make a clickable link out of a string:

https://community.bpmonline.com/questions/hyperlink-fields

Oscar Dylan,

I figured out how to implement this and wrote an article for it at 

https://community.bpmonline.com/articles/how-make-url-string-field-clickable-hyperlink.  The question I still have about this is that converter passes the same text to both the url and caption.  How do you set the url and caption from different fields, so that it looks and functions like most links, which don't display the URL? Is there syntax to pass two parameters to a method, either by passing two fields into the converter or using multiple converters or bindTos, so that I can set the url and caption from different fields?

 

Janine White,

The  getUsrURLpageLink returns an object with two parameters. You can adjust the value, which is passed to the parameter. URL parameter will store the link. Caption parameter will be set to value from other field. 

Therefore, retrieve the needed value before return and use it in the caption parameter. The method will look somewhat like this:

getUsrURLpageLink: function(value) {
                var caption = this.get("Field");
                return {
                        "url": value,
                        "caption": caption
                };
        }

Regards,

Anastasia

Anastasia Botezat,

Thanks!

Show all comments