I am trying to add Virtual Detail that will contain records which don't exist in DataBase.

Now I have Detail connected to Object "Card" and After clicking Get card I am calling Get method which returns Data which I Parse in my Detail . But records exists in DataBase and i want to make it virtual.

 

I am following https://community.creatio.com/articles/add-virtual-detail-page,

1.I Created Virtual Object .

2. I did not created service while we are making API call which will returns Data. 

3. I Created virtual detail. 

4. I Insert virtual detail into Contact page.

Error: As we see in collection there is my data and thats fine but I can not read Column in virtual Object. 

 

Please help how can i solve this issue and how to add virtual detail in proper way

Like 0

Like

2 comments

Here is an example of code for the detail that will input values from the custom array into the detail. Please also note that this approach will only work if the detail contains at least 1 record (in case there are no records you will need to click the button twice for the array content to be displayed in the page). Also don't forget to add the LoadGridButtonCaption localizable string to your detail schema:

define("UsrSchema130af5ebDetail", [], function() {
	return {
		entitySchemaName: "UsrTestDetail",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		attributes: {
			IsGridEmpty: {
                    dataValueType: this.Terrasoft.DataValueType.BOOLEAN,
                    value: true
                }
		},
		diff: /**SCHEMA_DIFF*/[
			{
                "operation": "insert",
                "name": "LoadGridButton",
                "parentName": "Detail",
                "propertyName": "tools",
                "values": {
                    "itemType": Terrasoft.ViewItemType.BUTTON,
                    "caption": {"bindTo": "Resources.Strings.LoadGridButtonCaption"},
                    "click": {"bindTo": "onLoadGridButtonClick"},
                    "style": Terrasoft.controls.ButtonEnums.style.TRANSPARENT
                }
            }
		]/**SCHEMA_DIFF*/,
		methods: {
			onLoadGridButtonClick: function() {
				//object to load data from
				var object = [
					{
						UsrName: "1111",
						UsrIntColumn: 1
					},
					{
						UsrName: "Test2",
						UsrIntColumn: 24
					}
				];
				//create view model for the object items
				var newCollection = Ext.create("Terrasoft.Collection");
				Terrasoft.each(object, function(item, key) {
					var model = Ext.create("Terrasoft.BaseViewModel", {
						rowConfig: {
							Id: {
								columnPath: "Id",
								dataValueType: Terrasoft.DataValueType.GUID
							},
							UsrName: {
								columnPath: "UsrName",
								dataValueType: Terrasoft.DataValueType.TEXT
							},
							UsrIntColumn: {
								columnPath: "UsrIntColumn",
								dataValueType: Terrasoft.DataValueType.INTEGER
							}
						},
						values: {
							Id: Terrasoft.generateGUID(),
							UsrName: item.UsrName,
							UsrIntColumn: item.UsrIntColumn,
						}
					}, this);
					newCollection.add(model.get("Id"), model);
				});
				//add new collection items from the created model
 
 
				//get current Grid collection
				var collection = this.get("Collection");
				//empty current Grid collection
				collection.clear();
				//add Grid collection items from the new collection
				collection.loadAll(newCollection);
				//specify that Grid data is loaded
				this.set("IsGridEmpty", false);
			}
		}
	};
});

Oleg Drobina,

It works, Thanks a lot.

Show all comments

Hi everyone,

I hope you're all doing well. I'm currently working on exporting an Excel report of section data and its details in Creatio. I found a package named IntExcelExport in the Creatio marketplace, which seemed perfect for my needs.

However, I ran into an issue while trying to configure the report. Whenever I try to set it up, I get the following error:

"Cannot read properties of null (reading 'isTiled')"

I've tried several times, but I keep encountering the same problem. Has anyone else experienced this issue or have any insights on how to resolve it?

 

Any guidance or suggestions would be greatly appreciated!

Thank you in advance for your help.

Like 0

Like

1 comments

Hello Abderrahman Tigami,

I have successfully configured and generated Excel reports using the current version of the app. I kindly ask you to provide more details how to reproduce your issue (version of Creatio instance, report type, any section or specific one).

Show all comments

Hi Creatio Community,

 

I am currently working on a project in Creatio Freedom UI and need to implement a tree view for a section or detail. This functionality is essential for displaying data hierarchically and enhancing user navigation.

Could anyone provide guidance or share any documentation, examples, or best practices on how to achieve this in Creatio Freedom UI? Your assistance would be greatly appreciated.

Thank you in advance for your help.

Like 1

Like

1 comments

Satyam, 

Have you checked the product selection in the order module ?

 

The object cannot be directly taken from the component in the Freedom UI designer but you can use it if you set as parent the "Base entity catalog page (BaseEntityCatalogPage)" page in your page. 

 

As restult you will get a hierarchy tree and then you can customize the page as needed. I tried it with the case object and using the account and contact in the hierarchy.

 

inherit from base entity catalog page

 

Set the option on the hierarchy tree

Show all comments

Hi guys,

Anyone knows whether it's possible to remove the default access right for "All employees" when creating a new Report?

Thank you in advance for the help

Like 1

Like

2 comments
Best reply

Hi Federica,

This process is assigning the access to all employees.

 

You can create a new version with appropriate access rights you want to apply.

 

I hope this helps!

Process

Hi Federica,

This process is assigning the access to all employees.

 

You can create a new version with appropriate access rights you want to apply.

 

I hope this helps!

Process

Thanks Franck! Smart idea :)

Show all comments

Hi

 

Somebody tried to enable Playbook areticles in a Freedom UI DCM's?

 

I tried, but they didn't appears

 

Some trick?

 

Thanks

Julio Falcón

Like 0

Like

2 comments
Best reply

Ryan Farley,

Thanks Ryan, I saw that it is a new component, I was looking for it in the DCM, as in Classic UI. :-)

Show all comments

Hi,

 

I have to implement validations on the editable detail of a section. For the purpose, I am using addRecord

But while I am trying to get the value of the lookup field which is connecting the records to the main section, it is returning undefined.

 

Please refer below code:

addRecord: function()

{

     this.DurationValidation();

     this.callParent(arguments);

}
DurationValidation : function()
            {
                var invalidMessage="";
                try
                {
                     var esqDuration = this.Ext.create("Terrasoft.EntitySchemaQuery", {
                    rootSchemaName: "UsrPRDetail"
                });
                esqDuration.addColumn("UsrDurationmin");
                var groupFilters = this.Ext.create("Terrasoft.FilterGroup");
                var currentPR = this.get("UsrPR");
                console.log(currentPR);
                var filterId = this.Terrasoft.createColumnFilterWithParameter(this.Terrasoft.ComparisonType.EQUAL, "UsrPR", currentPR);
                groupFilters.addItem(filterId);
                esqDuration.filters.add(groupFilters);
                esqDuration.getEntityCollection(function(result) {
                    if (!result.success) {
                        this.showInformationDialog("Request error");
                        return;
                    } else {
                        var totalDuration = 0;
                        result.collection.each(function(item) {
                            totalDuration += item.get("UsrDurationmin");
                        });
                        this.set("totalSessionDuration", totalDuration);
                        
                        console.log(totalDuration);
                        this.showInformationDialog(totalDuration);
                         invalidMessage = this.get('Resources.Strings.DurationLimitExceeded');
                        this.showInformationDialog(invalidMessage);
                    }
                }, this);
                }
                catch(e)
                {
                    console.log(e);
                }
                finally
                {
                    return {
                        invalidMessage: invalidMessage
                    };
                }   
            }

 

 

Due to this undefined value, I am not able to check the total duration of details elements in current section record. Please guide in this regard.

Like 0

Like

1 comments

Hello,

 

From the code I can suppose that the undefined value is in the UsrPR column and it happens because the addRecord method triggers before the record values are filled in and the record is actually added (the method is triggered once the + button to add a record is clicked).

 

In case you need to get the value for the lookup column that links the detail to the main section you can use

 

this.values.DefaultValues
 

to get the value for the main section record (in the screenshot below the detail is added to the CasePage and the main entity is Case, the lookup column to connect detail to the main section in the detail is UsrCase):

Show all comments

Congratulations. 

I have a task of filtering the reference field (Platform) by specific parameters in the page code.
Contact-Account-Licenses-Product-Platform.


In the SQL query, it looks like this:

select "Id", "Name" from "UsrPlatformList" as "platforms" 
	where 
		exists (select * from "Product" as "product" where  ("platforms"."Id") = ("product"."UsrPlatformId") and 
			exists (select * from "UsrLicenceClient" as "license" where ("product"."Id") = ("license"."UsrProductLicId") and 
			"license"."UsrAccountId" = '601cef3f-aa30-4fc0-b681-18d3e748ec65'
			)
		)

I'm trying to follow this instruction, but I can't.
I will be grateful for your help.

Like 1

Like

2 comments
Best reply

Ryan Farley,

I am sincerely grateful to you. With your help, other answers in the community and articles from the Academy, I learned and managed to write this complex filter. Thank you. The code currently looks like this:

attributes: {
	"UsrPlatform": {
		"dataValueType": Terrasoft.DataValueType.LOOKUP,
		"lookupListConfig": {
			"filter": function() {
				var platformFilter = this.Ext.create("Terrasoft.FilterGroup");
				var accountId = this.get("Account").value;
 
				var licenceFilter = Terrasoft.createExistsFilter(
					"[UsrLicenceClient:UsrProductLic].Id");
 
				licenceFilter.subFilters.addItem(
					Terrasoft.createColumnFilterWithParameter(
						Terrasoft.ComparisonType.EQUAL,
							"UsrAccount", accountId));
 
				var productFilter = Terrasoft.createExistsFilter(
					"[Product:UsrPlatform].Id", licenceFilter);
					platformFilter.addItem(productFilter);
				return platformFilter;
			}
		}
	}
}

I hope it helps someone and saves a lot of time.

 

You can create an exists filter by using something like the following. This example would get accounts where an activity exists with a particular owner.

// create the sub filter for the condition inside the exists
var subFilters = Terrasoft.createFilterGroup();
subFilters.addItem(Terrasoft.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "Owner", "a6b4ea0c-420c-45ab-81e7-6e76c8cc15f7"));
 
// now create the exists filter and pass the sub filter conditions to it
// note, this second param of subFilters is optional if all you want is the exists without sub conditions
var existsFilter = Terrasoft.createExistsFilter("[Activity:Account].Id", subFilters);
esq.filters.addItem(existsFilter);

That is the equivalent to the following:

Ryan

Ryan Farley,

I am sincerely grateful to you. With your help, other answers in the community and articles from the Academy, I learned and managed to write this complex filter. Thank you. The code currently looks like this:

attributes: {
	"UsrPlatform": {
		"dataValueType": Terrasoft.DataValueType.LOOKUP,
		"lookupListConfig": {
			"filter": function() {
				var platformFilter = this.Ext.create("Terrasoft.FilterGroup");
				var accountId = this.get("Account").value;
 
				var licenceFilter = Terrasoft.createExistsFilter(
					"[UsrLicenceClient:UsrProductLic].Id");
 
				licenceFilter.subFilters.addItem(
					Terrasoft.createColumnFilterWithParameter(
						Terrasoft.ComparisonType.EQUAL,
							"UsrAccount", accountId));
 
				var productFilter = Terrasoft.createExistsFilter(
					"[Product:UsrPlatform].Id", licenceFilter);
					platformFilter.addItem(productFilter);
				return platformFilter;
			}
		}
	}
}

I hope it helps someone and saves a lot of time.

 

Show all comments

Hi everyone!

Please, help me.

I need pass added parametr for when I calling detail.

I've got ClientModule with details.

One of them is tied to "Opportunity".

I need pass added parametr "Order" for detail when I calling it.

It hepls me use method for calling detail

Like 1

Like

5 comments

You can include values from the page as default values for the detail by modifying the detail definition on the page. 

details: {
    MyDetailSchema: {
        schemaName: "MyDetailSchema",
        entitySchemaName: "MyObject",
        filter: {
            masterColumn: "Id",
            detailColumn: "MyObject"
        },
        defaultValues: {
            UsrSomeName: {masterColumn: "UsrName"},
            UsrSomeDate: {masterColumn: "CreatedOn"}
        }
    }
}

The above will populate the UsrSomeName column on the detail with the value of the UsrName column on the current page and also populate UsrSomeDate on the detail using the value of the CreatedOn of the page. 

You can also use values that don't exist on the page, for example: 

"defaultValues": {
   "UsrSomeDate": { "value": new Date() }
}

Ryan

thank  you, Ryan.

But something wrong.

my page's default:

 

When I boot page, my parametr "CtsTuOpport" is undefined:

 

 

Hi,
The code Ryan provided worked for me, what it does, is automatically fill the detail column when you create a new page:

details: /**SCHEMA_DETAILS*/{
            "Schema685740a4Detail9ea5ec10": {
                "schemaName": "Schema685740a4Detail",
                "entitySchemaName": "TestDet",
                "filter": {
                    "detailColumn": "Order",
                    "masterColumn": "Id"
                },
                "defaultValues": {
                   "UsrSomeDate": {masterColumn: "CreatedOn"}
               }
            }

Perhaps the issue in your case is that you didn't use the "" brackets.

Thanks for reply

Dmytro Vovchenko, tell me, where is the sintaxis trouble, please:

 

        details: /**SCHEMA_DETAILS*/{
            "GenFinanceOperations_Detail2cec2e66": {
                "schemaName": "GenFinanceOperations_Detail",
                "entitySchemaName": "GenFinanceOperations",
                "filter": {
                    "detailColumn": "GenTuInspector",
                    "masterColumn": "GenCheckFinOper",
                },
               "defaultValues": {
                  "GenTuInspected":  {masterColumn: true}
              }
            }
        }/**SCHEMA_DETAILS*/,
 

 

 

 

I need set parametr "true" for the calling detail

Show all comments

Hi, when in a section that contains a multiple cases. you change from one case to another with a field change, a button is shown to validate the case change. 



Is there a way to avoid this? I want to progress bar to automatically update from one case to the other without user intervention. 

Like 1

Like

1 comments

I'm having a scenario where I need to add two custom columns in attachment detail and need to edit that.So I have overridden the LinkPageV2 and added those two columns in diff.Now the fields are displaying in the required section attachment detail.However other section showing error in console stating that the columns are not found in that sectionFile Object

Is there a way to dynamically load diff based on the condition/for a particular section only?


Thanks,
Sivaranjani

Like 0

Like

2 comments

No, diff cannot be loaded based on conditions (only properties like visible or enabled can be changed using conditions, but not blocks of code).

The best approach is to add a boolean attribute on the LinkPageV2

attributes: {
	"IsForAccount": {
		dataValueType: Terrasoft.DataValueType.BOOLEAN,
		columnType: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
		value: false
	}
}

Then bind it to the visible property of the element in the diff

{ //...
    "visible": { "bindTo": "IsForAccount" }
}

On the page init check what the entity type is for the page and set the boolean: 

init: function() {
	this.callParent(arguments);
	this.set("IsForAccount", this.get("entitySchemaName") === "AccountFile");
}

Using this approach will work since the value will never get submitted when saved.

Ryan

Show all comments