Время создания
Filters
I_want_to_integrate_my_own_service_via_a_Marketplace_app
Studio_Creatio
8.0

Hey guys,

I want to integrate my own service via a Marketplace app — for example, add a button on the contacts page (or somewhere) to send an email or SMS to the user.

I'm having trouble creating my own Freedom UI page where I can embed a button like "Message the user". I need to somehow connect this Freedom UI page to my REST service.

Also, I want to pass a token so I know the request is coming from a specific client/user.

The docs only talk about OAuth for logging in somewhere with external services, but that's not what I need.

Can you help with this?

Basically, I need a place to store the token — something one-time setup in the app configuration, so when a user installs my app, they can enter their own tokens (API keys or whatever), and then every request from Creatio to my service includes that token so I can identify which client it comes from.

Thanks!

Like 0

Like

0 comments
Show all comments

I want to create this function where the deadline of my tasks for my sales process, I want it to follow the working days & working hours that I have set-up using calendars. 

However, when I checked initially it doesn't by default use the working days/working hours that I set up in calendars. Its instead just taking calendar days.

Does anyone know how I can create maybe a business process to these two requirements: 

  1. When creating a task deadline, the system calculates the end date factoring the holidays setup in calendars. For example the task has a SLA/deadline to be completed in 5 days and the task was created this Monday. But this Tuesday its a holiday in the calendar, so the deadline for this task is not set for Friday but instead the following Monday. 
     
  2. When tracking total task duration can this track the setup working hours in calendar? Because right now when the partner tries this, its counting the entire 24 hour day instead of the 8 working hour that has been set-up.
     

If anyone knows or has experience with setting up the business process would appreciate it

Like 0

Like

0 comments
Show all comments
How_to_detect_modified_fields_before_save_and_conditionally_block_save?

Hi Community,

I am working with Creatio Freedom UI (8.x) and I have the following validation requirement.

Scenario

I have two sets of fields:

  • Set A → A group of key fields (for example: Field1, Field2, Field3)
  • Set B → A group of  fields (for example: ApprovalReason, Comments)

Requirement

  1. If any field from Set A is modified, then:
    • I need to check whether all fields in Set B are filled.
    • If any field in Set B is empty → block save and show validation message.
  2. If the user modifies fields that are NOT part of Set A:
    • Save should be allowed normally.

My Questions

  1. In Freedom UI, is there any built-in attribute that stores the list of changed/modified fields before saving the record?
  2. If not, what is the recommended approach to detect whether specific fields were modified?
  3. Should this logic be implemented:
    • On client side using HandleViewModelAttributeChangeRequest?
    • Or in backend using the EntitySaving event and comparing old/new values?
  4. Is there a supported way to retrieve changed columns on the backend instead of manually comparing values?

I would like to follow the recommended and supported best-practice approach.

Thanks in advance!

Like 1

Like

1 comments

Client-side approach is to add a handler for the "crt.SaveRecordRequest" request. There you could validate and then return false to prevent the save from occurring. You'd likely also want to show a notification to the user for what is wrong. There is something in the $context that shows the changed, fields, but can't remember what it's called so you could throw it to the debugger to look.

For a server-side approach, you could implement an entity event listener. You could override the OnSaving (for both inserts and updates) to validate and then throw an exception if the validation fails. This will prevent the save and the UI will show the exception message in a toast notification to the user automatically. The EventArgs passed in will show you which fields have changed.

Ryan

Show all comments

Dear colleagues,

I have a Freedom UI page (Creatio v8.3.2.4166) that activates the Save button immediately on load, without any user interaction.

After extensive debugging, I identified three contributing factors:

1. ForwardReference attributes in modelConfigDiff. The page has multiple attributes of type "ForwardReference" resolving data from two related entities. These are all read-only fields. Example:

"NcsRelatedEntityNcsDescription_abc123": {
    "path": "NcsRelatedEntity.NcsDescription",
    "type": "ForwardReference"
}

When these attributes resolve asynchronously after page load, the framework registers them as user changes and sets HasUnsavedData = true.

2. RichTextEditor controls with <strong>needHandleSave: true</strong> — for some reason the page wizard generated them with true by default, even though all of them are readonly and display data from a related entity, not from the current object's own fields. We changed all of them to needHandleSave: false, which helped partially but did not fully resolve the issue.

3. Calculated field handlers. The page has a handler that calculates age from a birth date field (and another similar purpose handlers):

{
    request: "crt.HandleViewModelAttributeChangeRequest",
    handler: async (request, next) => {
        if (request.attributeName === 'PDS_NcsBirthDate_abc123') {
            const birthDate = await request.$context.PDS_NcsBirthDate_abc123;
            if (birthDate) {
                const today = new Date();
                const birth = new Date(birthDate);
                let age = today.getFullYear() - birth.getFullYear();
                if (today.getMonth() < birth.getMonth() ||
                   (today.getMonth() === birth.getMonth() &&
                    today.getDate() < birth.getDate())) {
                    age--;
                }
                request.$context.PDS_NcsAge_xyz789 = age;
            } else {
                request.$context.PDS_NcsAge_xyz789 = null;
            }
        }
        return next?.handle(request);
    }
}

When the page loads with an existing record, PDS_NcsBirthDate_abc123 fires as an attribute change event during model initialization, the handler writes PDS_NcsAge_xyz789, and that write marks the page dirty — even though both values were already saved in the database.

The same pattern applies to a handler that composes a full name from first and last name fields, and to the RichTextEditor ForwardReference fields that display read-only rich content from a related entity.

What we tried:

Approach 1 — Subscribing to events$ in HandleViewModelInitRequest to detect finish-load-model-attributes, setting a window._NcsPage_pageReady flag, and guarding all attribute change handlers behind it. This correctly prevents our own handlers from triggering dirty state, but does not prevent the framework itself from setting HasUnsavedData = true when ForwardReferences resolve.

Approach 2 — Adding a HandleViewModelResumeRequest handler that forces HasUnsavedData = false after the model is ready. This fires too early — ForwardReferences resolve after Resume, so they overwrite the reset.

Approach 3 — Using setInterval (up to 35 cycles × 200ms = 7 seconds) inside the Init handler to repeatedly reset HasUnsavedData = false. This does not work because the request.$context captured in the Init handler closure becomes stale after initialization — Creatio replaces the ViewModel reference, so we are resetting a dead object.

Approach 4 — Intercepting all HandleViewModelAttributeChangeRequest as the first handler in the chain, calling await next?.handle(request) and then forcing HasUnsavedData = false on the fresh request.$context. This works during the initial load phase (while _pageReady = false), but ForwardReferences continue resolving after _pageReady = true, still triggering dirty state.

Approach 5 — Combining Approach 4 with permanent suppression for all known ForwardReference attributes (since they are always readonly):

{
    request: "crt.HandleViewModelAttributeChangeRequest",
    handler: async (request, next) => {
        const result = await next?.handle(request);
        const isForwardRef = request.attributeName?.startsWith('PDS_NcsRelatedEntity');
        if (!window._NcsPage_pageReady || isForwardRef) {
            request.$context.HasUnsavedData = false;
        }
        return result;
    }
}

This still fails — HasUnsavedData keeps flipping back to true after each reset.

Questions:

  1. Is there a supported Freedom UI pattern to prevent HasUnsavedData from being set by ForwardReference resolution on page load?
  2. Is there a lifecycle event or request that fires reliably after all ForwardReferences have fully resolved?
  3. Is there a way to prevent a handler that writes a calculated field (like age from birth date) from marking the page dirty when it fires during initialization?
  4. Is there any way to mark specific attributes as non-dirty-tracking so the framework ignores their changes for save state purposes?

Any guidance from the community would be greatly appreciated. Thank you very much

Regards

Julio Falcón

Like 1

Like

2 comments

Hi Julio,

For the change event handler, you can use request.silent == false. The request.silent indicates if the change was from a model load (silent=true) vs a user change (silent=false).

{
    request: "crt.HandleViewModelAttributeChangeRequest",
    handler: async (request, next) =&gt; {
        if (request.attributeName === 'PDS_NcsBirthDate_abc123' &amp;&amp; !request.silent) { // only handle user changes
            //...
        }
        return next?.handle(request);
    }
}

Ryan

For question 3, you can use the method marked as being the answer in this thread: https://community.creatio.com/questions/it-possible-make-changes-attributes-code-freedom-ui-silently

 

Unsure about the others - I haven't seen forward references causing the page to think there's changed data that needs saving in earlier versions of Creatio, so if that is causing the issue it would sound like a bug in 8.3.2?

 

I'm also not aware of a supported way of resetting the page/specific attributes so that Creatio doesn't think they have changed or will never pay attention to changes in them. It would be nice to have this option though.

Show all comments
AI
creatio.ai
data
security

Hi, 

Could you explain a bit more how the data protection layer works ( as shown on  https://www.creatio.com/ai/ai-trust-and-governance ) ? Does it anonymize data before sending to the LLM ? Is there more documentation about it ? What do we need to configure for custom fields ? How does it handle data in files ?



Does it work such as mentioned below ?



 

Like 0

Like

0 comments
Show all comments