Hello.

 

I'm trying to save a pdf file that i get from a service web, the file comes in a base64 string so i use a script to convert it to a pdf and save it in Creatio, I have this code that works fine for the Accounts section but when i want to save the file in  a Custom section, the process send me an error sometimes because it doesnt find the Id other because it says that the duplicate key value violates unique constraint.

 

This is the code that works in the Accounts Section.

 

var base64FileString = Get<string>("Base64File");
var accountId = Get<Guid>("AccountId");
 
var attachFileType = new Guid("529bc2f8-0ee0-df11-971b-001d60e938c6");
var fileName = Get<string>("NameFile"); // set proper file type
 
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();
return true; 

 

And this is the code that I want to use in the custom section

 

var base64FileString = Get<string>("Base64File");
var resguardoId = Get<Guid>("ResguardoId");
 
var attachFileType = new Guid("529bc2f8-0ee0-df11-971b-001d60e938c6");
var fileName = Get<string>("NameFile"); // set proper file type
 
var entity = UserConnection.EntitySchemaManager.GetInstanceByName("SysFile");
var fileEntity = entity.CreateEntity(UserConnection);
fileEntity.SetDefColumnValues();
fileEntity.SetColumnValue("ResguardoId", resguardoId);
fileEntity.SetColumnValue("TypeId", attachFileType);
fileEntity.SetColumnValue("Name",fileName);
fileEntity.SetBytesValue("Data", Convert.FromBase64String(base64FileString));
fileEntity.Save();
return true; 

 

 

Like 0

Like

4 comments

The SysFile entity doesn't, and won't, have a "ResguardoId" column. It has generic columns so it can work with any entity. Instead of setting ResguardoId, set the following: 

  • RecordId - the Id of the record (the value for ResguardoId)
  • RecordSchemaName - the name of the entity for the RecordId (whatever the entity name is for ResguardoId)

Ryan

Ryan Farley,

 

Thank you 

 

I'm made the change, the process starts without any error but the file is not save it in the record.

 

var base64FileString = Get&lt;string&gt;("Base64File");
var recordId = Get&lt;Guid&gt;("RecordId");
 
var attachFileType = new Guid("529bc2f8-0ee0-df11-971b-001d60e938c6");
var fileName ="New.pdf"; // set proper file type
 
var entity = UserConnection.EntitySchemaManager.GetInstanceByName("SysFile");
var fileEntity =  entity.CreateEntity(UserConnection);
fileEntity.SetDefColumnValues();
fileEntity.SetColumnValue("RecordId", recordId);
fileEntity.SetColumnValue("TypeId", attachFileType);
fileEntity.SetColumnValue("Name",fileName);
fileEntity.SetBytesValue("Data", Convert.FromBase64String(base64FileString));
fileEntity.Save();
return true; 

Laura Jurado,

You also need to populate the RecordSchemaName property - refer back to my previous comment.

Ryan

Show all comments

Hello,

 

I would like to know how to approach the task of extracting the model of field entities to a CSV  or Excel file.

The idea is to provide project managers with a simplified view of the fields available in my Creatio instance. I'm not looking for details, just the field name, code, label (translation?), data type.

 

Any sugestions on how to approach this task?

 

Thanks,

Vlad 

Like 0

Like

4 comments
Best reply

This marketplace addon will provide you with an Excel export of all obejcts in the system, along with columns, data types, display titles of objects and columns, etc. 

https://marketplace.creatio.com/app/object-structure-export-creatio

Once installed, there will be a process you can run that gives you the Excel file. 

Ryan

Hello!

 

You can check all the information about data export on Creatio Academy:
https://academy.creatio.com/docs/8.x/creatio-apps/creatio-basics/business-data/exporting-list-data-to-excel

Thank you for your reply Arsenii, but it is not the data that I am trying to export, but the model.

 

Exemple for Accounts entity:

 

field name; field code; field label; data type; default value

Name; Name; The company name; Text - 250 caracters; <empty>

Phone; Phone; Main phone number; Text - Phone number; <empty>

Web; Web; Compny Website; Text - Web link; <empty>

(...)

 

Kind regards,

Vlad

 

This marketplace addon will provide you with an Excel export of all obejcts in the system, along with columns, data types, display titles of objects and columns, etc. 

https://marketplace.creatio.com/app/object-structure-export-creatio

Once installed, there will be a process you can run that gives you the Excel file. 

Ryan

Ryan Farley,

Perfect, I'll give it a try. 

 

Thank you,

Vlad

Show all comments

Hi Creatio Community,

I'm currently working on a customization for the Activity page, and I need some help with dynamically showing/hiding tabs based on the activity type. Here’s what I need to achieve:

  1. Hide the "Attachment" tab when the activity type is "Task."
  2. Show the "Case Attachment" tab for tasks related to a specific case only (it should display attachments only for the selected case).
  3. For all other activity types, the "Case Attachment" tab should be hidden, and the regular "Attachment" tab should be visible.

Essentially, I want the tab visibility to switch dynamically based on the activity type and the case involved. I’d appreciate any suggestions on how to implement this, whether through JavaScript handlers, custom logic, or any other method that can meet this requirement.

Thanks in advance

Like 0

Like

1 comments

Hello,
 

This can be easily implemented using business rules such as "Show/hide an element on a Freedom UI page." We recommend exploring this functionality on our academy.
 

https://academy.creatio.com/docs/8.x/no-code-customization/customization-tools/ui-and-business-logic-customization/freedom-ui-business-rules#title-2416-2
 

I hope this helps!

Show all comments

How to hide Attachment tab in task type activity while showing my own case attachment tab or in general how can i programmatically hide a toggle tab in freedom ui .

I want to hide the attachment toggle tab and show case attachment which is created by be , also want to programmatically trigger their visibility , please refer below image for reference 

 

Like 1

Like

1 comments

I was able to achieve this using only DOM. To do this - two buttons were created: clicking the first button will trigger the usr.HideButtonRequest request, clicking the second button will trigger the usr.ShowAttachmentsRequest. Here is the code of schema handlers:

handlers: /**SCHEMA_HANDLERS*/[
          {
            request: "usr.HideButtonRequest",
            handler: async (request, next) =&gt; {
              let savedAttachmentsElement = document.querySelectorAll('[data-item-marker="Attachments"]')[0];
              request.$context.AttachmentToggleItem = savedAttachmentsElement;
              request.$context.AttachmentToggleItemParentNode = savedAttachmentsElement.parentNode;
              savedAttachmentsElement.parentNode.removeChild(savedAttachmentsElement);
              return next?.handle(request);
            }
          },
          {
            request: "usr.ShowAttachmentsRequest",
            handler: async (request, next) =&gt; {
              let attachmentToggleContainer = request.$context.AttachmentToggleItemParentNode;
              let attachmentsToogleItem = request.$context.AttachmentToggleItem;
              attachmentToggleContainer.appendChild(attachmentsToogleItem);
              return next?.handle(request);
            }
          },
        ]/**SCHEMA_HANDLERS*/,

And also two attributes were added to the viewModelConfig property of the schema (in case you don't have it in the schema - create it):

viewModelConfig: {
          attributes: {
            "AttachmentToggleItem": {},
            "AttachmentToggleItemParentNode": {}
          }
        },

As a result the "Attachments" toggle item is removed when the first button is clicked and then displayed when the second button is clicked. What is left to be done is add and test this approach with handlers like HandleViewModelAttributeChangeRequest.

Show all comments

Hi Team,

I am trying to send a user notification at the end of my business process, but I would prefer it not to appear as a hyperlink. I've attached a screenshot showing how it currently looks, along with my business process configuration where I set up the user notification element. I've reviewed an article on setting up notifications in a business process, but I'm looking for a workaround to disable the hyperlink.

Send a user notification in notification center from process | Community Creatio

 

 

 

Thanks.

 

Like 0

Like

1 comments

Hello,

 

Overall, it is the basic functionality of the site that the link should work as a hyperlink.

Currently, if you remove the Object column, the notification doesn't come through at all.

One option, which we do not recommend using, is to select a value for which there is no schema to drill into. However, this is not an ideal method.

 

For example, if you select Schema there:

 

It looks exactly the same, but nothing happens when you click on it.

Show all comments

Hello Creatio community,

 

I am using Creatio Studio Product (V.8.1.2.3941) and license "bpmonline self-service portal on-site subscription". 
I want to create a new section and page for a new object that I developed. This object will be available in Portal workplace. I created the portal screen using classic UI but it doesn't appear in the workplace setup for "External users". The only screen that Portal users can view is "Knowledge Base" screen which came with Creatio's product.

I read the Creatio documentation in "https://academy.creatio.com/docs/sites/academy_en/files/pdf/node/2088/C…" and it says that: "If you use the self-service portal, you can modify the existing portal sections but cannot add new sections.". How can I make my screen for my new created object available for portal users?

Like 0

Like

1 comments

Hello,

 

Unfortunately, according to the basic logic of our application, you cannot see any custom sections on the portal within the limitations of self-service portal license.
You can find more details in this article.

Show all comments

Hello

 

I been trying to block the record so the users can't make changes or erase the record at some point of the process to do that I am changing the access rigths of a record using the element Change Right in the DCM.

 

But I the record can still be modified and erase ( the user that I use to make the test is not a System Administrator) can you help me to know what Im doing wrong? 

 

Also it is posible that the owner of the record can't modified the information or i can't take away this right? 

 

Thank you.

Like 0

Like

1 comments

Hello!

 

My apologies I am not sure about your setting due to a lack of knowledge of your language. But basically here is an example of how you can set elements to remove rights from the case for All employees role:

 

Basically you are not able to remove rights from the Owner of the record, so this could be the reason.

 

Show all comments

Does anyone knows how to work with excel reports with the new business process element? Even though an Excel report is created, he doesn't appear on the business process element "Generate Excel Report".

 

Like 1

Like

2 comments
Best reply

It only allows "Custom Reports", not Section Report or Edit Page Reports. Also, for Custom Reports, there is a new checkbox on the report page that allows it to be used in processes. You need to check that, then it will show up in the process element to select.

Ryan

It only allows "Custom Reports", not Section Report or Edit Page Reports. Also, for Custom Reports, there is a new checkbox on the report page that allows it to be used in processes. You need to check that, then it will show up in the process element to select.

Ryan

Ryan Farley,

Thks. Ryan. 

Show all comments

deleted

Like 0

Like

2 comments

Hello Agnieszka,

To fix the issue you should change the property: 

1) sdk.ComparisonType.LessOrEqual to sdk.ComparisonType.Less_or_equal   

2) sdk.ComparisonType.GreaterOrEqual to sdk.ComparisonType.Greater_or_equal

Good practice is to check if the property exists with the console:

Anhelina,

Thank you

Show all comments

Hi Community,

 

I created a new user and added sections for this user in a separate workspace. I added lookups section; but the user is getting following error "Insufficient rights to go to this section. Contact your system administrator."  for lookups section, can you confirm how can the user access the lookups section?

 

Thanks

Like 0

Like

1 comments