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

When I try to compile all, i'm getting the below error - this is an almost vanilla Creatio 8.1.1.3635, just a handful of simple customizations:

 

Should i worry about this? How can this be fixed?

 

Thanks!

Like 0

Like

2 comments

Have you tired “generating source code for all schemas” before compiling?

Ryan

Ryan Farley,

I tried but the process never completed. I am trying again now. Will report back.

Show all comments

Creatio 8.1.2, clean database (MS SQL), starting from scratch.

 

These are the exact steps i took:

 

  • Restored Database from Creatio Zip
  • Configured IIS
  • In system settings, set the "prefix for object name" to "Wlf"
  • Go into Application Hub, create new application
  • In system settings, set the "current package" to the one that was created in previous step
  • In new application, click Navigation and Sections, then "New Freedom UI Section"
  • Set title of new section, click "create"
  • The following error is displayed:
  •  

    Any thoughts? The below is what i see in error log:

     

2024-05-17 17:10:35,888 [11] ERROR IIS APPPOOL\testapp_creatio Terrasoft.Nui.ServiceModel.AspNetFramework.Controllers.DataServiceController GetHttpActionErrorResult - Busy saving the configuration. The section has not been saved. Try again later.
System.Exception: Busy saving the configuration. The section has not been saved. Try again later.
  at Terrasoft.Core.Applications.Content.AppSectionManager.CheckIsNotSectionCreating()
  at Terrasoft.Core.Applications.Content.AppSectionManager.CreateSection(AppSectionInfo sectionInfo)
  at Terrasoft.Core.Applications.Content.AppSectionManager.Create(AppSectionInfo sectionInfo)
  at Terrasoft.Configuration.ApplicationSectionEventListener.OnSaving(Object sender, EntityBeforeEventArgs e)
  at Terrasoft.Common.CollectionUtilities.ForEach[T](IEnumerable`1 source, Action`1 action)
  at Terrasoft.Core.Entities.Entity.OnSaving(EntityBeforeEventArgs e)
  at Terrasoft.Core.Entities.Entity.d__319.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at Terrasoft.Core.Entities.Entity.d__334.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at Terrasoft.Nui.ServiceModel.BaseCrudDataService.d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at Terrasoft.Nui.ServiceModel.BaseCrudDataService.<>c__DisplayClass41_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at Terrasoft.Nui.ServiceModel.Extensions.ProcessExecutionDataExtensions.d__2`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at Terrasoft.Nui.ServiceModel.Extensions.ProcessExecutionDataExtensions.d__7`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at Terrasoft.Nui.ServiceModel.BaseCrudDataService.d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at Terrasoft.Nui.ServiceModel.AspNetFramework.Controllers.DataServiceController.d__20.MoveNext()

Like 0

Like

2 comments

I haven’t seen that one before. Could it be permissions on the configuration folders under Terrasoft.WebApp? Does generating source code and compiling (without adding new items) work normally?

Ryan

Ryan Farley,

In the end i solved the issue by moving the code from the Windows 11 machine where it was initially hosted to a Windows Server 2019. As far as I know permissions and prerequisites were set up the same in both.

Show all comments

Hi!

I'd like to add many-to-many relationship between Account and Contact. I've created an object "Account - Contact" and added some records to it.

Now I'd like to add a folder on Contacts list for displaying those contacts, who are related with "Our company" Account. Unfortunately, the list of columns for "Account - Contact" does not contain neither relationship-related lookup fields (like Contact, Account) nor any additional columns, stored in this object. There are only Quantity and some date fields.

 

 

I've tried to debug it and I realized that JSONs for DataService, which are generated by filter designer, try to use some aggregation function. Is there any way to solve my problem? The solution doesn't have to be simple and possible to do it by GUI :) I can modify the JSON, but so far I couldn't do it correctly in this case.

 

Is is technically possible for DataService, to use simple comparison in lookup for backward related objects, like "Account - Contact", or I'm restricted to use some kind of aggregation?

 

 

 

Like 3

Like

2 comments
Best reply

This is because there can be multiple "Account - Contact" records for  an account so the choices there are aggregates only. If you're adding this as a filter condition, select "Quantity" and then choose Quantity > 0. Then, inside of that, as a condition within the Quantity>0, you can add additional conditions, such as "Account" = "Some specific account", etc. 

Ryan

This is because there can be multiple "Account - Contact" records for  an account so the choices there are aggregates only. If you're adding this as a filter condition, select "Quantity" and then choose Quantity > 0. Then, inside of that, as a condition within the Quantity>0, you can add additional conditions, such as "Account" = "Some specific account", etc. 

Ryan

Oh, I didn't believe the solution is so simple :) Thank you!

Show all comments

Hi Community,

 

We have this business requirement where we need to add duplicated communication options. For example, we can have two records for the same phone number.

 

When we try to add the same number, we receive the following error:

 

How can we turn off this validation/constraint? 

 

Thank you in advance.

Best Regards,

Pedro Pinheiro

Like 0

Like

2 comments

Hello Pedro,

You can add a few equal phone numbers as the communication options. All you need is to choose the different types for them:

Hi Anhelina,

 

Thank you for the response.

 

The idea here is to use the same type. For example, we need to create multiple duplicated instances for "Mobile Phone", because later on we will be using these records for our business logic. The number might be the same, but we have other attributes that have unique keys. We want to change this rule so it can be applied to those attributes.

 

Best Regards,

Pedro Pinheiro

Show all comments

As the title says, we sometimes need to disable buttons while still showing them - something which was easy to do in Classic UI. Is there any way of doing so in Freedom UI? I can't see any examples in OOTB Freedom UI areas, anywhere that does have disabled buttons OOTB are in Classic UI sections (e.g. the "Finish session" button on the System User page on the Access Rules tab when no record is selected).

Like 1

Like

4 comments
Best reply

Classic UI buttons have a property 'enabled'
Freedom UI buttons have a property 'disabled'

Hi Harvey, 

Does it not work to bind an attribute to the enabled property of a button and set as true/false? I've not tried that, but I assume it would work? Have you already tried that?

Ryan

Classic UI buttons have a property 'enabled'
Freedom UI buttons have a property 'disabled'

Huh, not sure how I missed that, could've sworn I tried doing that! Thanks both.

As a note, the only way I could find to put some kind of hint/tooltip on the button when it's disabled is by using the "title" property, which gives you a standard browser tooltip display when hovering the mouse over the button. And binding that to an attribute that you change to be blank when the button is enabled.

Show all comments

Is it possible to set the value of a System setting which has the "Save value for current user" setting enabled for a specified user from C# code, e.g. from a script task? I've found the below code for setting a System setting, but presume that if the checkbox for the above is selected, then it will only set the value for the current user (or the System User if running in the system context):

var settingCode = Get<string>("UsrSystemSettingCode");
var value = Get<string>("UsrSettingValue");
Terrasoft.Core.Configuration.SysSettings.SetValue(UserConnection, settingCode, value);
return true;

 

We need to be able to set the per-user system setting for a specific user (determined by data in the BP in our case) but looking at the (always hard to find) API documentation, it doesn't seem like there's an overloaded version of SetValue that allows you to do so as a specified user - except possibly one that is marked as being deprecated in a much older version:

 

Like 0

Like

3 comments

Anybody have any info on this?

Does anyone have any other methods for managing per-user system settings in Creatio? It seems like there aren't a lot of options besides setting them in JS code when a user does a given action, but then that feels like it defeats some of the purpose of system settings being that the value doesn't have to be calculated every time a user does something, and also means it can't reliably be used for tasks like setting a default field value on an entity.

Contemplating using this methodology for running code when a user logs in to set it, hopefully it will work. Would be nice to have some clean way of doing it though, especially since we don't really need to be calculating it every time a user logs in but just when certain data changes: https://customerfx.com/article/executing-code-in-creatio-application-an…

Show all comments

Is it possible to create an entity based on a view (so with the "Represents Structure of Database View" checkbox checked, and with the view created using a SQL script) that inherits its record permissions from a "real" entity? I tried to do so by simply checking the record permissions checkbox and specifying the parent object in the "Object to inherit access permissions from" field of the entity, but this doesn't seem to work.

 

My setup is that we have the OOTB Leads entity, and then I've created a view over the top of it taking all columns but with a filter condition, to be used for reporting over Leads while filtering out certain Leads that should never be included in reporting so we have a more consistent reporting basis and don't have to make sure to include those filters in every widget. I added 2 columns to the view based on the Id and LeadName columns called UsrBaseLeadId and UsrBaseLeadName, which then have a lookup column UsrBaseLead added over them in the view-based entity. This lookup is then used as the "Object to inherit access permissions from" for the view-based entity.

 

There aren't any errors thrown in the logs when trying to do this, but non-super-users just can't see any of the records. When I tried to check a record in the view's permissions, I could see that the SysRights table for the view entity doesn't exist, so I tried creating that rights "table" as a view in the database that took its data from the Rights Table of the real entity, but while that seemed to work inasmuch as I could check a record's access rights and see that the correct rights were there and was even able to modify those rights, it didn't make it visible to a non-super-user.

Like 1

Like

3 comments
Best reply

It would be great to have the view be able to inherit permissions from some object that the view has as a lookup column. However, I don't believe that is possible. What I typically do is this:

  1. Create a view and include as a column some other object that has permissions (for example, if the view includes an Opportunity lookup column and the account has permissions)
  2. Anywhere the view is used, include a filter condition that some column on that related object is not null (that would never be null). Plus it cannot be the Id or the column used as the display value. Example, if my view has a lookup for Opportunity, I could use Opportunity.Stage is filled in.
  3. Using this approach, the user will only see the rows corresponding to the related record that they have access to, since if they cannot view the related opp the Stage will return a null value. 

It's not ideal and definitely not secure, but it does limit the view rows to what the user can see on the related object.

Ryan

Anybody have any experience of working with such a setup?

It would be great to have the view be able to inherit permissions from some object that the view has as a lookup column. However, I don't believe that is possible. What I typically do is this:

  1. Create a view and include as a column some other object that has permissions (for example, if the view includes an Opportunity lookup column and the account has permissions)
  2. Anywhere the view is used, include a filter condition that some column on that related object is not null (that would never be null). Plus it cannot be the Id or the column used as the display value. Example, if my view has a lookup for Opportunity, I could use Opportunity.Stage is filled in.
  3. Using this approach, the user will only see the rows corresponding to the related record that they have access to, since if they cannot view the related opp the Stage will return a null value. 

It's not ideal and definitely not secure, but it does limit the view rows to what the user can see on the related object.

Ryan

Yeah that's a clever workaround, many thanks Ryan! Agreed about the security aspect, but for the the cases where it's just about having those record permissions used to define non-security visibility as I currently have for the base entity it will work for now.

 

It would definitely be good for the view entities to be able to inherit permissions from lookup columns though, and feels like it would be a relatively quick win for Creatio to add, as most of the functionality around that would already exist. It could even be done in a no-code way by enabling the creation of these view-based entities directly in the config, effectively adding a logical layer to the platform which would be great for filtered views into the data and adding virtual calculated fields. A man can dream.

Show all comments

Hello everyone!

The issue i'm facing is that tasks synced from Google Calendar that are meetings and include Google Meet links are not displaying a "Join" button within Creatio. This makes it difficult for users to easily join these meetings directly from Creatio.

Here's how it should look like:

but this is how it is currently looking like:

this meeting already has a google meet link attached to it, as you can see in the next screenshot:

 

Here are some additional details about the issue:

  • -The tasks in question are synced from Google Calendar.
  • -The tasks are identified as meetings within Google Calendar and have associated Google Meet links.
  • -Despite being meetings with links, there is no "Join" button available within the task view in Creatio.
     

I would appreciate if anyone has faced this issue in the past, and how to solve it :)

Thanks in advance!

 

Like 0

Like

2 comments

Hello Mirla,

 
Thank you for reaching out. We've thoroughly examined your issue. Unfortunately, there is currently no automatic addition of a meeting button for Google Meets sync activity.   

Let me explain the logic of this functionality in more detail. When you add a meeting link to the activity “notes” field with a meeting link, this button is automatically displayed. 

 



As a workaround, when you create an appointment in Google Calendar, you can add a link to the description in the meeting details. And in this case, during synchronization, this data will automatically be transferred to the "Notes" field in Creatio and the Join button will appear automatically.

   chrome_Xp60WiFJb2.gif


Additionally, we offer a connector on the Creatio Marketplace that may address your business needs: https://marketplace.creatio.com/app/google-meet-connector-creatio .

However, we understand that this solution may not be ideal for you. Rest assured, we have already registered an idea for the development department to create this functionality.

Thanks for making Creatio better! 

Halyna Parkhomenko,

I see! thank you for the workaround and all the info! 

Show all comments

Is it possible to specify the default values that will be populated in fields on new records created via the "Quick add menu" in Creatio, similar to how you can do when adding a record from a button on a page:

 

I have seen that if you have multiple pages set up for an entity that the Quick add menu will create a sub-menu for each of the types which will mean that if you click on the specific sub-menu then that field will be defaulted to the value it should be, but we require that other fields are also defaulted to specific values depending on the type selected. Therefore blanket values being set as the default value on the entity won't satisfy the requirement, and the business rules are very limited around setting default values.

 

I can't see anything of much use in the "Quick add records menu" lookup used to configure the quick add menu.

Like 2

Like

2 comments

Hello!

It is impossible to configure default values for page types in the Quick Add menu. 

Default values are configured only for object fields. If a specific field type is used, the same default value will always be used for any typed page.

Thanks for reaching out!

Hi there.

I have very similar but slightly different task. I need to throw forward param values from current page to new record which is being created through lookup field on current page. I configured view diff like this 

			{
				"operation": "insert",
				"name": "ListAction_n8p4gak",
				"values": {
					"code": "addRecord",
					"type": "crt.ComboboxSearchTextAction",
					"icon": "combobox-add-new",
					"caption": "ComboBox.AddNewRecord",
					"clicked": {
						"request": "crt.CreateRecordFromLookupRequest",
						"params": {
							"defaultValues": [
								{
									"attributeName": "Account",
									"value": "$PDS_ClvAccount_p18pos2"
								},
								{
									"attributeName": "Contact",
									"value": "$PDS_ClvContact_ecd3h26"
								}
							]
						}
					}
				},
				"parentName": "Task_ComboBox",
				"propertyName": "listActions",
				"index": 0
			},

and I also tried to rename DefaultValues to additionalDefaultValues as debug led me to this could be possible property's name, but that didn't help. And now I see this thread. So it seems that handler "crt.CreateRecordFromLookupRequest" doesn;t allow at this point to process default values at all?

BTW this handler isn't described in academy handlers schema section | Creatio Academy

Is there any plans to develope that handler to be possible to pass default values ?

 

NB It could be great to have params for each type of handler to be described in academy's article like in articles for validators and converters converters schema section | Creatio Academy 

Show all comments