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

Hello,

I built a business process for our Leads section. The process works great when I use the mini-page. When I bypass the mini page it is not working. However, if I add another record (mini page or not) it comes in correctly and fixes the previous entry. It appears something is wrong with the trigger. I am hoping to have all entries, mini-page, non-mini page, or auto generated edited by the business process.

 

Matt 

 

Like 0

Like

0 comments
Show all comments

Like 0

Like

0 comments
Show all comments
"usr.FutureDateValidator": {
                validator: function (config) {
                    return function (control) {
                        let value = control.value;
                        
                        // This part right here //
                        if (value.readonly) {
                            return null;
                        }
            
                        let selectedDate = value instanceof Date ? value : new Date(value);
                        let today = new Date();
                        today.setHours(0, 0, 0, 0);
                        selectedDate.setHours(0, 0, 0, 0);
            
                        let valueIsCorrect = selectedDate >= today;
            
                        return valueIsCorrect ? null
                            : {
                                "usr.FutureDateValidator": {
                                    message: config.message
                                }
                            };
                    };
                },
                params: [{ name: "message" }],
                async: false
            }

This is a custom validation I made to validate a "Date Picker" component only for today and the following days. So it is unable to use past dates. 

The problem occured when modifying the field's value after I save, then modifying another field that is not the date picker, it will run this custom validation again. So if the data was saved the previous days, this custom validation will validate that date picker field.

The question is how do I read the value's "Read-Only" so I can turn off the validation when its value is 'true'?

Or if there is a better way to configure this validation, I will be happy to change it.

 

Notes: 

  • This is a custom package (outside creatio's source package)
  • Validate this field before it is saved
  • After saving, the validation is turned off
  • More than one is using this validation
  • If possible, can edit it ONLY when the field (date picker) is edited (not other fields)

 

Thanks for helping, ask me more questions if the information is not enough.

Like 1

Like

3 comments

You can turn on/off the validator so it only applies under the scenario you'd like.

Turn on:

request.$context.enableAttributeValidator("TheAttributeName", "TheValidatorName");

Turn off: 

request.$context.disableAttributeValidator("TheAttributeName", "TheValidatorName");

Note, the validator name there is whatever you named it when added to the attribute (which might not be the same as the actual validator). I don't know enough about the scenario, but if this is only something that would be populated when adding a new record maybe something like this would work? 

{
    request: "crt.HandleViewModelInitRequest",
    handler: async (request, next) => {
        await next?.handle(request);
 
        const cardState = await request.$context.CardState;
        if (cardState == "add" || cardState == "copy") {
            // enable the validator here
        }
        else {
            // disable the validator here
        }
    }
}

Ryan

Ryan Farley,

Hi Ryan,

Thank you for the suggestion. I appreciated that you showed me another way to handle the validation.

It is indeed convincing to use it based on the scenario I would use. But after I tried implementing it onto my page, it seems the "... disableAttributeValidator..." is not active.

Therefore my "FutureDateValidator" is still on and validating the field. I edit the handler similar to your example. This is one of the example field I use to handle it:

const fieldDateState1 = await request.$context.PDS_UsrMeetingDate_e6xd3ts;
 
if (fieldDateState1 === null || fieldDateState1 === undefined || fieldDateState1 === "") {
 
 
request.$context.enableAttributeValidator("PDS_UsrMeetingDate_e6xd3ts", "FutureDateValidator");
 
} else {
 
request.$context.disableAttributeValidator("PDS_UsrMeetingDate_e6xd3ts", "FutureDateValidator");
 
}

Is this correct? Because it is not working as I explained.

Do you have any more ways to configure this ?

Thanks for helping. I'm still open to more suggestions.


 

Oh I have found the issue. 

It was because I use "crt.HandleViewModelInitRequest", instead of "crt.HandleViewModelAttributeChangeRequest". 

Thanks for your help!

 

Show all comments
HRM
HR_automation
performance_management
onboarding

How to automate the entire employee lifecycle in Creatio

HR teams often deal with scattered processes. Recruiting is managed in one tool, onboarding in another, and performance tracking somewhere else. This leads to manual work, data loss and lack of visibility across the employee lifecycle.

Syntech HRM for Creatio Syntech HRM for Creatio | Creatio Marketplace solves this by bringing all HR processes into one system.

It is a complete HR management solution that covers every stage of the employee journey. From candidate sourcing and hiring to development, performance tracking and offboarding, everything is managed in a single workspace.

Recruiting becomes structured and predictable. You can manage candidates through customizable pipelines, schedule interviews, collect feedback and make decisions based on clear data. Integration with job platforms allows you to import candidates automatically and avoid duplicates.

Onboarding is no longer chaotic. The system provides structured 30 60 90 day plans, assigns responsibilities and tracks progress. New employees adapt faster and managers always see the current status.

Performance management is fully transparent. Set KPIs and OKRs, run review cycles, track employee growth and hold regular one to one meetings with automated scheduling and reminders.

Offboarding is handled in a controlled and professional way. The system ensures that all tasks are completed, knowledge is transferred and feedback is collected through exit interviews.

All data is stored in one place, which reduces manual work, minimizes errors and gives HR teams full visibility.

Syntech HRM for Creatio | Creatio Marketplace

Syntech HRM for Creatio helps companies build structured, scalable and efficient HR processes.

Like 1

Like

Share

0 comments
Show all comments
Diagram
syntech
relationship

Users often encounter fragmented data. Contacts, deals, contracts, and activities are scattered across multiple sections. This slows down decision-making and hides important relationships.

Syntech Relationship Diagram for Creatio solves this problem.

It turns your CRM into a visual and interactive map, where all relationships are displayed in one place. You can instantly see who is influencing a deal, how entities are related, and where opportunities or risks may exist, without ever leaving the record page.

With flexible configuration, drag-and-drop functionality, and no-code setup, your team can gain full visibility in minutes.

Fewer clicks. More insights. Faster decisions.

Syntech Relation Diagram for Creatio | Creatio Marketplace

Like 1

Like

Share

0 comments
Show all comments