Hi Everyone! 

I have a use case where I need to make adding a record to a detail on the Opportunity page mandatory for a specific stage in Opportunity DCM. 

Would anyone know how to implement it? 
Are there any differences between Classic and FUI? 
Can it be done through Validation? 

Any suggestions welcome!

Thanks so much for your help!
Jacek

Like 0

Like

4 comments
Best reply

Hello Jacek,

In order to implement your logic you will have to create the user task for adding a record to the detail and set it as required step in DCM.

Opportunity management 

Hello Jacek,

In order to implement your logic you will have to create the user task for adding a record to the detail and set it as required step in DCM.

Opportunity management 

Yeah, this is something a missing for which it's quite useful to have to behave like a mandatory field, rather than a task to fill in. 

Have not found a way other than to add task, but we did it in a business process so that it will first check if detail has some records or not. 

Use cases : Address filled in ; Products added to opp.. there's probably more. 

Our sales team are not big fans of extra tasks to validate in addition to the data to fill in.

Unfortunately, it is not possible to make some detail mandatory for filling in with user.  We registered this request and forwarded to our R&D team for consideration and implementation in future application releases.

It is possible to do with development though. 

Here is a sample algorithm for how it may be done in Classic UI. Please not that the methods in the examples serve only for giving an idea of how this may be done and don't perform actual business task: 

1) Create an ESQ to check if the detail has records added.

Example: 

checkDetailRecords: function() {
	var accountId = this.get("Id");
	var select = this.Ext.create("Terrasoft.EntitySchemaQuery", {
		rootSchemaName: "AccountAddress" //name of the detail object schema
	});
	var esqFilter = select.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "Account", accountId);
	select.getEntityCollection(function(response) {
		if (response.success) {
			var collection = result.collection;
			if (collection && collection.collection.length > 0) {
				this.set("DetailHasRecords", true);
				this.set("ESQCompleted", true);
				this.save();
			} else {
				this.set("DetailHasRecords", false);
				this.set("ESQCompleted", true);
				this.save();
			}
		}
	}, this);
}

2) After checking if there are any records you would need to save the result, for example, to an attribute: 

Example: 

attributes: {
	"DetailHasRecords": {
		"type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
		"dataValueType": Terrasoft.DataValueType.BOOLEAN,
		"value": false
	},
	"ESQCompleted": {
		"type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
		"dataValueType": Terrasoft.DataValueType.BOOLEAN,
		"value": false
	},
}

3) After that you can override save method for the opportunity to check if the detail is filled in when the opportunity in a specific stage  

Example: 

save: function() {
	if("ESQCompleted") {
		if("DetailHasRecords") {
			this.callParent();
		} else {
			this.showInformationDialog("Please fill in ....");
		}
	} else {
		this.checkDetailRecords();
	}
}

 

Also to prevent the opportunity when record was deleted from the detail and no records in the detail left you can use the method onDetailChanged: 

onDetailChanged: function(detail) {
	this.callParent(arguments);
	if (detail.schemaName === "AccountAddress")//name of the detail
		this.checkDetailRecords();
	}
}

Thank you Iryna and Damien for your replies and advice. This is much appreciated! 

Show all comments

Hi, 

Trying to add pre-defined filter which will list only transaction which were modified in last 10 mins in a Freedom Page. In the setting only Previous hour can be presented -- is there any way to handle this 

 

Thanks 

Like 0

Like

1 comments

Hello,

We checked the functionality and want to inform you that unfortunately there is no possibility to change it yet.

We have registered it in our R&D team backlog for consideration and implementation in future application releases. 

Thank you for helping us to improve our product.

Show all comments

Hello,

In my Project's form page, I have two charts that summarize data from a Time Cards object in the form of a bar chart and a column chart. After placing the chart component onto my form page, I had trouble resizing the charts to make them larger. I attached below an image for reference. Any help on how to resize charts would be greatly appreciated. Please let me know if you have any questions or need me to further clarify. 

 

Best,

Shubh

Like 0

Like

2 comments
Best reply

If you drag them taller it will give more room for the chart bars/columns and the text will be more readable.

If you drag them taller it will give more room for the chart bars/columns and the text will be more readable.

Ryan Farley,

Thank you! This worked. I did not see the little square to drag the chart taller before.

Show all comments

Dear,

When starting Creatio we have the following errors :

Classic UI

It seems that Creatio is not finding some language files.

Can these mistakes be corrected ?

Thank you !
Nicolas

Like 0

Like

1 comments

Hello!

Try to change the language of the user to English, recompile the system. Then switch back to French and try to reproduce the error.

Have a nice day!

Show all comments

Hello Creatio Community,

I am facing an issue when working with the JS editor in Creatio. After adding JavaScript code and clicking "Save," I receive a popup notification that says "Record successfully added." However, when I close the tab and reopen it later, the JS code is missing, and I have to re-enter it.

Has anyone encountered this issue? Is there any solution or workaround to ensure that the code is saved properly and remains after reopening the tab?

Thank you for your help!

im using 8.2.2

Like 0

Like

1 comments

Hello!

No, we haven’t encountered similar issues while working with the site.
Please gather more details and forward them to Creatio Support.

Show all comments

Hi All,

I have a question:
How can I get the current user's name, organizational role, functional role, and their manager's name, and auto-populate these values into different fields?

Could you please describe step by steps?
i'm using 8.2.2

Thank you

Like 0

Like

1 comments

You can get current user's name and there roles using this code https://customerfx.com/article/showing-or-hiding-a-field-if-the-current-user-is-a-member-of-a-role-in-a-creatio-freedom-ui-page/
just remove first filter from this code.

After getting roles you can set different field like this `request.$context.fieldcode=role`

Show all comments

Hi, Community.

Can you tell me if I can flip the register on list page by 90 deg?

Like 0

Like

2 comments

Hello!

Could you please add more details regarding your business aim?

If you mean changing the list page view in the section, in Creatio, list pages typically display data in a tabular format.

The main goal is to implement a schedule for approximately 100 employees.
There was an idea to implement it using a registry element.
However, the usual calendar view does not quite fit (i.e., dates and working hours are represented horizontally, and employees are listed vertically).
Since the number of employees will be relatively static, but weeks/months will continuously be added, the standard registry view is not entirely suitable for implementation.
The need arose to add new records horizontally (with the ability to scroll left/right) — these will be the weeks/months, while employees will remain static vertically.

The idea is to add new records to the registry horizontally, not vertically.
If it's not entirely clear, I can explain in more detail.

Is such implementation possible?
Perhaps you already have a ready solution for the schedule or better alternatives for implementing it?

Show all comments

Hi,

 

We have a environment where Creatio is System of engagement and core processing is done by backend system. When we query in the Creatio (say using Search field) Creatio invokes SelectQuery -- so how can trap the row count it returns and call a business process if it is zero -- the business process will invoke a API which gets the data from backend application and updates creatio 

 

Just business process with ability to inovke API and load Creatio objects is ready and working fine just how to invoke from Search (from Freedom UI)

Thanks and Regards

Like 0

Like

2 comments
Best reply

The list component has a couple of attributes you can use for this. You'll add a handler for the "crt.HandleViewModelAttributeChangeRequest" request and listen for changes to these attributes. There are a few attributes you could use, one that is ListName_NoItems (boolean) (or "DataTable_NoFilteredItems" for when the list is filtered) or ListName_Items (array of items). If your list component is named "DataGrid_ysopiif", your attribute names would be "DataGrid_ysopiif_NoItems", etc.

Add something like the following to the handlers of the page with the list:

{
    request: "crt.HandleViewModelAttributeChangeRequest",
    handler: async (request, next) => {
        if (request.attributeName === "DataTable_NoItems" || request.attributeName === "DataTable_NoFilteredItems") {
            if (request.value) {
                // no records returned for list
            	Terrasoft.showInformation("No results returned!");
            }
        }
    	return next?.handle(request);
    }
}

Ryan

The list component has a couple of attributes you can use for this. You'll add a handler for the "crt.HandleViewModelAttributeChangeRequest" request and listen for changes to these attributes. There are a few attributes you could use, one that is ListName_NoItems (boolean) (or "DataTable_NoFilteredItems" for when the list is filtered) or ListName_Items (array of items). If your list component is named "DataGrid_ysopiif", your attribute names would be "DataGrid_ysopiif_NoItems", etc.

Add something like the following to the handlers of the page with the list:

{
    request: "crt.HandleViewModelAttributeChangeRequest",
    handler: async (request, next) => {
        if (request.attributeName === "DataTable_NoItems" || request.attributeName === "DataTable_NoFilteredItems") {
            if (request.value) {
                // no records returned for list
            	Terrasoft.showInformation("No results returned!");
            }
        }
    	return next?.handle(request);
    }
}

Ryan

Ryan thanks -- moved to Data_grid and used the following code and it works. 

Now to see how to fix a filter which can show only records which are modified in last 5 mins (out of box gives in hours only)


        handlers: /**SCHEMA_HANDLERS*/[
            {
                request: "crt.RefreshedDataGrid",
                handler: async (request, next) => {
                      const context = await request.$context;
                      const list = await context.DataGrid_cdjhzhp;
                      const listCount = list?.length ?? 0;
                      if ( listCount == 0 &&  await request.$context.SearchFilter_fvbn39g_SearchValue.__zone_symbol__value
!= null ){
                              const uxClaimID= await request.$context.SearchFilter_fvbn39g_SearchValue.__zone_symbol__value
;
                              console.log("Claim Id = " + uxClaimID);
                               const result = await request.$context.executeRequest({
                                          type: "crt.RunBusinessProcessRequest",
                                          processName: "HC_ClaimACID",
                                          processParameters: { ClaimID: uxClaimID },
                                          //resultParameterNames: ["HC_ClaimGUID"],
                                          $context: request.$context
                               });
                               //if (await result.success) { 
                                // }
                       }
                      return next?.handle(request);  
             } 
         }        

Show all comments

Hi Community,

I'm trying to identify the ObjectName (schema name) and the RecordId of a form page that is currently open in Creatio (Freedom UI), using the context data available (as shown in the attachment). Is there a recommended way to retrieve this information through code or the browser console?

What’s the best way to access this data from within the button click handler?

Reference Screenshot

Thanks in advance!

Ajay K

Like 1

Like

1 comments

This is possible, but only from the context of the page itself. I am not sure if it's possible from a sidebar to know anything about the current page loaded elsewhere, maybe with a request handler in a remote module where you can specify the scopes?

As for getting this info within the context of the page, to get the primary data source, you can use: 

const pds = await request.$context.getPrimaryModelName();

With the data source name, you can get the schema for the datasource which will give you the entity/object name, the Id column attribute, and also the primary display value attribute using the following (note, this gets the attribute names, not the values): 

const pds = await request.$context.getPrimaryModelName();
const schema = await request.$context.dataSchemas[pds];
 
const entityName = await schema.name;
const idColumn = await schema.primaryAttributeName;
const nameColumn = await schema.primaryDisplayAttributeName;

Now that you have the attribute names, you can get the values: 

const idValue = await request.$context[idColumn];
const nameValue = await request.$context[nameColumn];
// etc

This sort of thing works great if you have a custom base page type that could be used for many different pages/objects. 

Also, as a FYI, not sure how this is going to change after 8.2.3 since 8.2.3 has a beta feature (not enabled out of the box) that allows a page to have multiple connected data sources. That might break some of this.

Ryan

Show all comments

Hello community,

Is there any way to map the Parent object, while importing data in the detail?

(Example : We want to Import a (Product In Order) in an Order.

Thank you 

Sasor

 

 

Like 0

Like

4 comments

Hello!


Thank you for your question!

Allow me to clarify how the import process works. When importing data into Creatio, you are essentially transferring the information from your Excel file into the corresponding database table. Each detail in Creatio corresponds to a different object or database table. Therefore, during an import, data can be inserted into one table or object at a time.

Import to Contact/Accounts have custom core logic applied, but all other objects work with logic described above.

You can read more about Excel import on Creatio Academy: https://academy.creatio.com/docs/8.x/creatio-apps/creatio-basics/busine…

Have a nice day!

Hello community,

Any update regarding this topic?

Sasor

Hello, answer has been already provided , but we will duplicate it below for your convenience: 

"Thank you for your question!

Allow me to clarify how the import process works. When importing data into Creatio, you are essentially transferring the information from your Excel file into the corresponding database table. Each detail in Creatio corresponds to a different object or database table. Therefore, during an import, data can be inserted into one table or object at a time.

Import to Contact/Accounts have custom core logic applied, but all other objects work with logic described above.

You can read more about Excel import on Creatio Academy: https://academy.creatio.com/docs/8.x/creatio-apps/creatio-basics/busine…

Have a nice day!"

Dear support team members

Kateryna and Oleksandra

I believe you missunderstood our request

_____________________________________________

Here is the scenario

  1. We are in the Opportunity Section.
  2. We want to import a list of Competitors.
  3. While importing the excel file, containing the Competitors list, we need that the competitors list, is assigned to this specific Opportunity '495 / Fast Works / Sale of Goods'
  4. We want to obviously achieve this without manually adding the '495 / Fast Works / Sale of Goods' as a separate column for all the records of the excel. 

Is there any example in the Code-Base, or any other workaround where this is achieved?

Sasor
 

Show all comments