Hi community,

 

What's the best way to filter records in a user friendly way ?

 

I have an object with details and lookups (simplified on this diagram).

Is there a more user-friendly way to filter ObjectSection records based on the lookupDetail value?

I thought of a workaround with a new object, then a detail in that new object that is filtered by a field above, but I don't know if this is the best way to do it. Because these are objects, it's clearly not a good way to filter records. I need these filters to be persistent for the logged in user, but several users will use this search "page" at the same time.

 

The global search is not a good solution either, I need to filter the records of a specific object according to the search values that are in the details of my object.

 

Do you have any idea how I can make this "search page"?

 

Best regards,

 

Julien

Like 0

Like

2 comments

Hello Julien,

I have implemented something like what you're referring to. I have a section where a client manages "areas" and zip codes are assigned to each area (in a detail in this section). This client didn't want to have to create a filter to locate the area for a zip each time they needed - they always locate an area by a zip code in the area. I implemented the ability to search for an area based on a zip code in the detail for the area. It turned out like this: 

Basically, I did the following in the section schema: 

1) Add a text attribute for the value being searched, you'll also want to add an onChange for the attribute so it triggers a change event method. Mine looks like this (note, all the updateSection function does is refresh the section - this is a function in the base section):

attributes: {
	"ZipSearchValue": {
		dataValueType: Terrasoft.DataValueType.TEXT,
		value: "",
		onChange: "updateSection"
	}
}

2) Add an element to the diff bound to the attribute in #1. You could add this with parentName "FiltersContainer" or "GridUtilsContainer", depending on where you want it, but you'll likely need to style it with some CSS to get it to look right. Mine looks like this: 

{
	"operation": "insert",
	"name": "ZipSearchText",
	"parentName": "FiltersContainer",
	"propertyName": "items",
	"index": 0,
	"values": {
		"layout": {
			"colSpan": 12,
			"rowSpan": 1,
			"column": 0,
			"row": 0,
			"layoutName": "FiltersContainer"
		},
		"hasClearIcon": true,
		"bindTo": "ZipSearchValue",
		"caption": "Find zip",
		"classes": {
			"wrapClassName": ["fx-zipsearch"]
		}
	}
}

3) When the user types in the textbox, it will trigger the onChange which just refreshes the section. When the section refreshes, it will call the getFilters method in the section code where you can append to the filters for the list. I have an article about that here: https://customerfx.com/article/programmatically-overriding-or-adding-fi… My filter method looks like this:

getFilters: function() {
	var filters = this.callParent(arguments);
 
	if (!Ext.isEmpty(this.get("ZipSearchValue"))) {
		var filter = Terrasoft.createFilterGroup(),
			subFilters = Terrasoft.createFilterGroup();
 
		subFilters.add("ZipValueFilter",
			Terrasoft.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "UsrZipCodeValue", this.get("ZipSearchValue").trim())
		);
 
		filter.addItem(Terrasoft.createExistsFilter("[UsrZipCode:UsrDistributorArea].Id", subFilters));
		filters.add("ZipSearchFilter", filter);
	}
 
	return filters;
}

Hope this helps get you started.

Ryan

Ryan Farley,

Thank you for your contribution. It will be very useful.



In the "OperatorCustomerEngagementCenter" package there is a client module named "SearchAccountAndContactPage.js". You can find a screenshot here: https://community.creatio.com/questions/adding-button-search-contacts-a…

I will try to load a custom view like this and use your answer to create filters. I'll post how I did it once done so other people can do it too.

 

Best regards,

 

Julien

Show all comments

Hi community,

 

I try to display (or not) an element based on information found on the contact page of the connected user. I tried with a business rule but I only can choose the user connected and not its related objects and their attributes.

 

So I tried something like that in the methods :

		methods: {
			init: function() {
				this.callParent(arguments);
				this.mixins.MultiChoiceMixin.init.call(this, arguments);
				// console.log(this.checkIfInHR());
				},
			/** 
			* Check if connected user is in HR department
			* @param  {string} departmentId  The contact's department Id
			* @param  {string} contactTypeId The contact's type Id
			* @return {bool} 			true if user is in HR department, otherwise false
			*/
			checkIfInHR: function(departmentId = "", contactTypeId = ""){
 
				// if called without args, query connected contact
				if (departmentId == "" && contactTypeId == ""){
					var esq = Ext.create("Terrasoft.EntitySchemaQuery", {rootSchemaName: "Contact"});
 
					// query the contact's department and contact's type
					esq.addColumn("Department");
					esq.addColumn("Type");
 
					// Execute the query 
					esq.getEntity(Terrasoft.SysValue.CURRENT_USER_CONTACT.value, function(res) {
						if (res.success){
							// call checkIfHR again but with args this time
							this.checkIfHR(res.entity.values.Department.value, res.entity.values.Type.value);
						}}, this);
				} else {
					// if args are passed
					// console.log() will be removed in prod
					console.log("departmentId : ", departmentId);
					console.log("contactTypeId : ", contactTypeId);
					console.log("response : ", departmentId == "ca611978-6277-4576-8a96-22ae54fe4d79" && contactTypeId == "60733efc-f36b-1410-a883-16d83cab0980");
					// 1st Id : HR department, 2nd Id: Our company
					return departmentId == "ca611978-6277-4576-8a96-22ae54fe4d79" && contactTypeId == "60733efc-f36b-1410-a883-16d83cab0980";
				}
			}
		}

Then I tried to call this method in the DIFF part :

			{
				"operation": "insert",
				"name": "Tab0f271a37TabLabel",
				"values": {
					"caption": {
						"bindTo": "Resources.Strings.Tab0f271a37TabLabelTabCaption"
					},
					"items": [],
					"order": 11
				},
				"parentName": "Tabs",
				"propertyName": "tabs",
				"index": 10,
				"enabled": this.checkIfInHR()
			},

but it always gives me this error now:

Uncaught TypeError: this.checkIfInHR is not a function

 

Do you have a better way to hide a tab based on values in the user connected' contact page or a way to fix my error ?

 

Best regards,

 

Julien G.

Like 0

Like

3 comments
Best reply

Hi Julien,

 

I cannot see the checkIfInHR method call on the init method execution, but I suppose you wanted to call it inside the "enabled" property of the Tab0f271a37TabLabel object. Ok, but the problem is that you need to use:

"enabled": {"bindTo": "checkIfInHR"},

and also the "enabled" property should be initialized inside the "values" object. So the code should've been:

onEntityInitialized: function() {
				this.callParent(arguments);
				this.mixins.MultiChoiceMixin.init.call(this, arguments);
				this.checkIfInHR();
				},
 
....
 
{
				"operation": "insert",
				"name": "Tab0f271a37TabLabel",
				"values": {
					"enabled": {"bindTo": "checkIfInHR"},
					"caption": {
						"bindTo": "Resources.Strings.Tab0f271a37TabLabelTabCaption"
					},
					"items": [],
					"order": 11
				},
				"parentName": "Tabs",
				"propertyName": "tabs",
				"index": 10
			},

The next problem is that this approach won't work since there is no "enabled" property for tab labels. So the general approach should be modified.

 

I would suggest using this check in the onEntityInitialized method:

onEntityInitialized: function() {
				this.callParent(arguments);
				this.mixins.MultiChoiceMixin.init.call(this, arguments);
				this.reformTabsCollection();
			},
			reformTabsCollection: function(){
				this.checkIfInHR();
				var tabsCollection = this.get("TabsCollection");
				if (this.get("BooleanAttribute")==false) {
                        tabsCollection.removeByKey("TheTabYouNeedToBeNotVisible");
                    }
			}

Also you need to create some bool attribute where the result of the checkIfInHR method will be written (using this.set("BooleanAttribute", true) or this.set("BooleanAttribute", false) at the end of the checkIfInHR method execution based on the checkIfInHR method results). There is no need to store the tab on the page in case it should be non clickable.

 

Best regards,

Oscar

Change it from this:

"enabled": this.checkIfInHR()

To this (and move inside of "values"):

"enabled": { "bindTo": "checkIfInHR" }

Ryan

Hi Julien,

 

I cannot see the checkIfInHR method call on the init method execution, but I suppose you wanted to call it inside the "enabled" property of the Tab0f271a37TabLabel object. Ok, but the problem is that you need to use:

"enabled": {"bindTo": "checkIfInHR"},

and also the "enabled" property should be initialized inside the "values" object. So the code should've been:

onEntityInitialized: function() {
				this.callParent(arguments);
				this.mixins.MultiChoiceMixin.init.call(this, arguments);
				this.checkIfInHR();
				},
 
....
 
{
				"operation": "insert",
				"name": "Tab0f271a37TabLabel",
				"values": {
					"enabled": {"bindTo": "checkIfInHR"},
					"caption": {
						"bindTo": "Resources.Strings.Tab0f271a37TabLabelTabCaption"
					},
					"items": [],
					"order": 11
				},
				"parentName": "Tabs",
				"propertyName": "tabs",
				"index": 10
			},

The next problem is that this approach won't work since there is no "enabled" property for tab labels. So the general approach should be modified.

 

I would suggest using this check in the onEntityInitialized method:

onEntityInitialized: function() {
				this.callParent(arguments);
				this.mixins.MultiChoiceMixin.init.call(this, arguments);
				this.reformTabsCollection();
			},
			reformTabsCollection: function(){
				this.checkIfInHR();
				var tabsCollection = this.get("TabsCollection");
				if (this.get("BooleanAttribute")==false) {
                        tabsCollection.removeByKey("TheTabYouNeedToBeNotVisible");
                    }
			}

Also you need to create some bool attribute where the result of the checkIfInHR method will be written (using this.set("BooleanAttribute", true) or this.set("BooleanAttribute", false) at the end of the checkIfInHR method execution based on the checkIfInHR method results). There is no need to store the tab on the page in case it should be non clickable.

 

Best regards,

Oscar

Oscar Dylan,

 Thank you very much !

 

Best regards,

 

Julien

Show all comments

Hi,



When we push our main package on dev environment to test environment, DCMs (Lead and opportunity) only partially update.



We binded the SysDcmSettings as well as SysDcmSchemaInSettings in the package, new stages get added to the DCM however, stages for which name have changed or been removed/replaced with another stage do not update.



Any idea what could be happening ?

Like 0

Like

3 comments

Hi,

 

You need to check if the SysDcmSchemaInSettings and SysDcmSettings is connected properly to the package. To check it you need to:

 

1) Execute the following SQL query (if you are using PostgreSQL, then you need to replace square brackets with quotes):

 

SELECT [SysDcmSettingsId], [SysDcmSchemaUId] FROM [SysDcmSchemaInSettings] WHERE [SysDcmSchemaUId] = '8d628f2a-7941-42f3-98dd-aed0b6b708fc'

where 8d628f2a-7941-42f3-98dd-aed0b6b708fc is the UId of the SysSchema record for this DCM (can be also retrieved from the URL bar of the browser when the DCM wizard is opened):

2) Make sure that there are SysDcmSchemaInSettings and SysDcmSettings bindings present in your package with the following data bound:

 

--SysDcmSettings

--SysDcmSchemaInSettings

 

In my example above these settings were saved for the DCM in the "Orders" section created by "Order status" column. 

 

3) Once the package is deployed only changes in the DCM structure will be saved. But if you renamed some stages in the dev app - they won't be renamed in the target app.

 

To transfer updated names for stages you will need to perform an export/import of translations. For example, order stages can be found in the "Translations" section using the following filter by "Key" column: %Data:OrderStatus.Name%

So the final action that should be performed after the package installation is transferring of translations (using an import of translations into the "Translations" object of the target app from the excel file that was formed as a result of the export of translations from the dev app).

 

Using this approach everything should be transferred properly.

 

Best regards,

Oscar

Oscar Dylan,

 



HI Oscar,



Thanks a lot, it seems I have translation issues indeed. However, it is a nightmare to work the with translation section in Creatio - it takes hours and hours to load and any mishap makes the section reload completely again, which is just not feasible work in a day..... This is something Creatio really needs to improve on ...



The quickest solution I found was to connect once in english, load lookup,  set column view to show the fields' ID, take a screenshot. Switch profile to French, go back to dcm stages lookup, view fields ID to make sure I'll match with the right fields in english, rename there.

Damien Collot,

 

Yes, sometimes the translations section needs much time to load. And sometimes it helps to run the actualization process separately (in this case the translations section opens faster). You can go to configurations, find the TranslationActualizationProcess, open it and run the process. Wait until it's completed and then try going to the translations section.

 

Also yes, you are correct, you can also rename values in the localization needed for the translation to be applied, but I am not sure if it will transfer the translation in such a case. Using the translations export\import works like a clock, but if you tested the approach with renaming under the French user profile and installing the package after that - perfect, then we have two options now:)

 

Best regards,

Oscar

Show all comments

Hi community,

 

I try to trigger a business process that take one argument when I click on a button. When I click on my button the pop-up (as defined in my code below) shows up but I have an error via the console in chrome dev tools.

 

Here is the error that occurs (XML parse error: not well formatted):

 

Here is my schema :

define("ContactSectionV2", ["ProcessModuleUtilities", "ContactSectionV2Resources"], function(ProcessModuleUtilities, resources) {
	return {
		entitySchemaName: "Contact",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "insert",
				"name": "BtnCreateCandidat",
				"parentName": "CombinedModeActionButtonsCardLeftContainer",
				"propertyName": "items",
				"values": {
					itemType: Terrasoft.ViewItemType.BUTTON,
					style: Terrasoft.controls.ButtonEnums.style.BLUE,
					classes: {
						"textClass": ["actions-button-margin-right"],
						"wrapperClass": ["actions-button-margin-right"]
					},
					click: { bindTo: "OnClickCreateCandidat" },
					tag: "CombinedModeActionButtonsCardLeftContainer",
					caption: { bindTo: "Resources.Strings.BtnCreateCandidatCaption" },
					hint: { bindTo: "Resources.Strings.BtnCreateCandidatHint" },
					enabled: true,
				},
			},
		]/**SCHEMA_DIFF*/,
		methods: {
			OnClickCreateCandidat: function(){
				var contactId = this.getActiveRow().get("Id");
				var args = {
					parameters: {
                        ProcessSchemaContactStr: contactId
                    },
					sysProcessName: "MTF_CreateCandidatIfNotExists",
					callback: function(){
						this.showInformationDialog(contactId);
						return true;
					},
					// scope: this
				};
				ProcessModuleUtilities.executeProcess(args);
				return true;
			},
		}
	};
});

And here is my business process :

 

It takes one argument as input :

 

"parse contactId" is a simple line to transform a string to a Guid :

Guid.Parse([#ContactStr#])

and I set the value returned to the ContactId argument.

 

then I try to read a candidate with the Contact Guid that I just set (a Candidate has a lookup field to a Contact object).

 

It just check if the candidate was found, if not it will create it. The BP returns the Candidate Guid.

 

The business process runs, the Candidate object is created (empty for some reason, not even with the Contact lookup filled) each it needs but I always have the XML parse error.

 

Do you know how can I debut this and how can I resolve this ?

 

Best regards,

 

Julien G.

Like 0

Like

7 comments

Hello Julien,

 

Please find this request in the network tab of the browser and send the complete response to this request. Also what is being written in the server logs?

 

Best regards,

Oscar 

Oscar Dylan,

 

The button send a POST request.

Request (json) :

{
  "collectExecutionData": true,
  "parameterValues": [
    {
      "name": "ProcessSchemaContactStr",
      "value": "afbdee02-d829-4cd6-aef9-74c719e3d169"
    }
  ],
  "schemaName": "MTF_CreateCandidatIfNotExists",
  "resultParameterNames": []
}

and the response (json) :

{
  "processId": "a78bff89-c553-43bc-9d3a-210302be2c25",
  "processStatus": 2,
  "resultParameterValues": null,
  "executionData": null,
  "success": true,
  "errorInfo": null
}

Here is the IIS log when I click my button :

(I replaced Creatio's IP, Creatio's FQDN and my IP address)

2021-10-27 08:30:42 CreatioFQDN POST /0/ServiceModel/ProcessEngineService.svc/RunProcess - 443 julien.gunther myIPAddress Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:93.0)+Gecko/20100101+Firefox/93.0 https://CreatioFQDN/0/Nui/ViewModule.aspx 200 0 0 624

I don't have any other logs..

Julien Gunther,

 

This error somehow prevents the data from saving or something is not working in the system when you receive this error to the client-side? If not, please ignore it.

 

Best regards,

Oscar

Oscar Dylan,

This prevents the data from being saved correctly. The newly created object is saved but it is an empty object. No data is saved in the saved object.

 

Another problem is that when I click on this button, a pop-up window appears with the Guid of the selected contact (as specified in the section diagram), then it loads indefinitely. The only way to get out of this state is to reload the page.

 

Best regards,

 

Julien

Julien Gunther,

 

Issues like this are not possible to be solved in the community. Please share the backup of the app if this is deployed locally and provide steps to reproduce the problem in the email sent to support@creatio.com and I will take a look.

 

Best regards,

Oscar

Julien Gunther,



Could you go to the process library, select your business process and click the property. In the open page, check the "Trace enabled" option. 

 

After that, you can find the trace log in the business process log. From there, you can check what is the parameter value and if the value is correct or not before/after the certain step.

 

According to what you described, it sounds like the contactId parameter is not setup correctly. So it is important to ensure the contactId after your Guid.Parse is correct.

 

On the other hand, have tried to set the contactId directly from button click scripts?

 

regards,

 

Cheng Gong

Cheng Gong,

 

Sorry for my late reply,



I checked the trace, the contactId has been defined successfully. I have no trace for the formulas, only for "Create Candidate" and "Try Read Candidate".

 

Try Read Candidat trace :

{
	"Paramètres de l'élément": [
		{
			"Paramètre": "Sources de données des filtres",
			"Valeur": {
				"Avant exécution": "{\"className\":\"Terrasoft.FilterGroup\",\"serializedFilterEditData\":\"{\\\"className\\\":\\\"Terrasoft.FilterGroup\\\",\\\"items\\\":{\\\"c46e04a9-f961-4607-8585-9eb58c49d628\\\":{\\\"className\\\":\\\"Terrasoft.InFilter\\\",\\\"filterType\\\":4,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"className\\\":\\\"Terrasoft.ColumnExpression\\\",\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"MTFContactCandidat\\\"},\\\"isAggregative\\\":false,\\\"key\\\":\\\"c46e04a9-f961-4607-8585-9eb58c49d628\\\",\\\"dataValueType\\\":10,\\\"leftExpressionCaption\\\":\\\"Candidat\\\",\\\"referenceSchemaName\\\":\\\"Contact\\\",\\\"rightExpressions\\\":[{\\\"className\\\":\\\"Terrasoft.ParameterExpression\\\",\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"className\\\":\\\"Terrasoft.Parameter\\\",\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Parameter:{e8e60615-91be-40a0-a225-2922d2a98f23}]\\\",\\\"displayValue\\\":\\\"ContactId\\\",\\\"Id\\\":\\\"e2c00489-34d4-4d18-a703-39f3c30e7543\\\"}}}]}},\\\"logicalOperation\\\":0,\\\"isEnabled\\\":true,\\\"filterType\\\":6,\\\"rootSchemaName\\\":\\\"MTF_Candidat\\\",\\\"key\\\":\\\"\\\"}\",\"dataSourceFilters\":\"{\\\"items\\\":{\\\"c46e04a9-f961-4607-8585-9eb58c49d628\\\":{\\\"filterType\\\":4,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"MTFContactCandidat\\\"},\\\"rightExpressions\\\":[{\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Parameter:{e8e60615-91be-40a0-a225-2922d2a98f23}]\\\",\\\"Id\\\":\\\"e2c00489-34d4-4d18-a703-39f3c30e7543\\\"}}}]}},\\\"logicalOperation\\\":0,\\\"isEnabled\\\":true,\\\"filterType\\\":6,\\\"rootSchemaName\\\":\\\"MTF_Candidat\\\"}\"}",
				"Après exécution": "{\"className\":\"Terrasoft.FilterGroup\",\"serializedFilterEditData\":\"{\\\"className\\\":\\\"Terrasoft.FilterGroup\\\",\\\"items\\\":{\\\"c46e04a9-f961-4607-8585-9eb58c49d628\\\":{\\\"className\\\":\\\"Terrasoft.InFilter\\\",\\\"filterType\\\":4,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"className\\\":\\\"Terrasoft.ColumnExpression\\\",\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"MTFContactCandidat\\\"},\\\"isAggregative\\\":false,\\\"key\\\":\\\"c46e04a9-f961-4607-8585-9eb58c49d628\\\",\\\"dataValueType\\\":10,\\\"leftExpressionCaption\\\":\\\"Candidat\\\",\\\"referenceSchemaName\\\":\\\"Contact\\\",\\\"rightExpressions\\\":[{\\\"className\\\":\\\"Terrasoft.ParameterExpression\\\",\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"className\\\":\\\"Terrasoft.Parameter\\\",\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Parameter:{e8e60615-91be-40a0-a225-2922d2a98f23}]\\\",\\\"displayValue\\\":\\\"ContactId\\\",\\\"Id\\\":\\\"e2c00489-34d4-4d18-a703-39f3c30e7543\\\"}}}]}},\\\"logicalOperation\\\":0,\\\"isEnabled\\\":true,\\\"filterType\\\":6,\\\"rootSchemaName\\\":\\\"MTF_Candidat\\\",\\\"key\\\":\\\"\\\"}\",\"dataSourceFilters\":\"{\\\"items\\\":{\\\"c46e04a9-f961-4607-8585-9eb58c49d628\\\":{\\\"filterType\\\":4,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"MTFContactCandidat\\\"},\\\"rightExpressions\\\":[{\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Parameter:{e8e60615-91be-40a0-a225-2922d2a98f23}]\\\",\\\"Id\\\":\\\"e2c00489-34d4-4d18-a703-39f3c30e7543\\\"}}}]}},\\\"logicalOperation\\\":0,\\\"isEnabled\\\":true,\\\"filterType\\\":6,\\\"rootSchemaName\\\":\\\"MTF_Candidat\\\"}\"}"
			}
		},
		{
			"Paramètre": "Lire d'abord",
			"Valeur": {
				"Avant exécution": true,
				"Après exécution": true
			}
		},
		{
			"Paramètre": "Ordre des colonnes",
			"Valeur": {
				"Avant exécution": "Name:1:1",
				"Après exécution": "Name:1:1"
			}
		},
		{
			"Paramètre": "Premier élément de la collection résultante",
			"Valeur": {
				"Avant exécution": {},
				"Après exécution": {}
			}
		},
		{
			"Paramètre": "Lire les données non validées",
			"Valeur": {
				"Avant exécution": true,
				"Après exécution": true
			}
		},
		{
			"Paramètre": "Considérez l'heure dans le filtre",
			"Valeur": {
				"Avant exécution": true,
				"Après exécution": true
			}
		}
	],
	"Paramètres du processus": [
		{
			"Paramètre": "Candidat",
			"Valeur": {
				"Avant exécution": "00000000-0000-0000-0000-000000000000",
				"Après exécution": "00000000-0000-0000-0000-000000000000"
			}
		},
		{
			"Paramètre": "ContactId",
			"Valeur": {
				"Avant exécution": "42a4317d-1712-41b2-994c-11b6fc64b199",
				"Après exécution": "42a4317d-1712-41b2-994c-11b6fc64b199"
			}
		},
		{
			"Paramètre": "ContactStr",
			"Valeur": {
				"Avant exécution": "42a4317d-1712-41b2-994c-11b6fc64b199",
				"Après exécution": "42a4317d-1712-41b2-994c-11b6fc64b199"
			}
		}
	]
}

 

Create Candidat Trace :

{
	"Paramètres de l'élément": [
		{
			"Paramètre": "Objet",
			"Valeur": {
				"Avant exécution": "106e3cde-5534-4cac-a87d-37c23359b9ef",
				"Après exécution": "106e3cde-5534-4cac-a87d-37c23359b9ef"
			}
		},
		{
			"Paramètre": "Filtres des sources de données",
			"Valeur": {
				"Avant exécution": "",
				"Après exécution": ""
			}
		},
		{
			"Paramètre": "Module d'ajout d'enregistrement",
			"Valeur": {
				"Avant exécution": "0",
				"Après exécution": "0"
			}
		},
		{
			"Paramètre": "Objet",
			"Valeur": {
				"Avant exécution": "00000000-0000-0000-0000-000000000000",
				"Après exécution": "00000000-0000-0000-0000-000000000000"
			}
		},
		{
			"Paramètre": "Définir la valeur des colonnes",
			"Valeur": {
				"Avant exécution": {
					"Values": {
						"b8993e82-0840-410a-82a7-386a3295755c": "00000000-0000-0000-0000-000000000000"
					},
					"FetchMetaPathes": {}
				},
				"Après exécution": {
					"Values": {
						"b8993e82-0840-410a-82a7-386a3295755c": "00000000-0000-0000-0000-000000000000"
					},
					"FetchMetaPathes": {}
				}
			}
		},
		{
			"Paramètre": "L'Id de l'enregistrement a été créé",
			"Valeur": {
				"Avant exécution": "00000000-0000-0000-0000-000000000000",
				"Après exécution": "3bb08bf6-abc8-4385-9b99-957c2aaa6d8c"
			}
		},
		{
			"Paramètre": "Considérez l'heure dans le filtre",
			"Valeur": {
				"Avant exécution": true,
				"Après exécution": true
			}
		}
	],
	"Paramètres du processus": [
		{
			"Paramètre": "Candidat",
			"Valeur": {
				"Avant exécution": "00000000-0000-0000-0000-000000000000",
				"Après exécution": "00000000-0000-0000-0000-000000000000"
			}
		},
		{
			"Paramètre": "ContactId",
			"Valeur": {
				"Avant exécution": "42a4317d-1712-41b2-994c-11b6fc64b199",
				"Après exécution": "42a4317d-1712-41b2-994c-11b6fc64b199"
			}
		},
		{
			"Paramètre": "ContactStr",
			"Valeur": {
				"Avant exécution": "42a4317d-1712-41b2-994c-11b6fc64b199",
				"Après exécution": "42a4317d-1712-41b2-994c-11b6fc64b199"
			}
		}
	]
}

 

As you can see, the ContactStr parameter was successfully parsed into a Guid object.



I have no errors and, according to the trace, my Candidate object was created successfully.



When I click on the button, it gives me the contact ID in a string, that's why I had to convert it into a Guid.



Best regards,



Julien

Show all comments

Hi community,

 

I'd like to add button on a active row in a data grid :

 

For that I found posts on the community that explain how to achieve that :

https://community.creatio.com/questions/alteradd-row-buttons-newly-crea…

https://community.creatio.com/questions/add-button-row-section

https://community.creatio.com/articles/add-button-active-row-detail

https://community.creatio.com/questions/override-section-open-record-bu…

 

I tried to follow them. Here is my code :

define("ContactSectionV2", ["ProcessModuleUtilities"], function(ProcessModuleUtilities) {
	return {
		entitySchemaName: "Contact",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "insert",
				"name": "BtnRowCreateCandidature",
				"parentName": "DataGrid",
				"propertyName": "activeRowActions",
				"values": {
					"className": "Terrasoft.Button",
					"style": Terrasoft.controls.ButtonEnums.style.BLUE,
					"tag": "DataGridCandidature",
					"caption": { "bindTo": "Resources.Strings.BtnRowCreateCandidatureCaption" },
					"hint": { "bindTo": "Resources.Strings.BtnCreateCandidatureHint" },
				}
			}
		]/**SCHEMA_DIFF*/,
		methods: {
			onActiveRowAction: function(buttonTag, primaryColumnValue){
				this.callParent(arguments);
				switch(buttonTag){
					case "DataGridCandidature":
						this.myCustomFunction(primaryColumnValue);
						break;
				}
			},
			myCustomFunction: function(primaryColumnValue){
				this.showInformationDialog(primaryColumnValue);
			},
		}
	};
});

But for some reasons, the newly created button never showed up.

Is this the right way to create a button in a datagrid row ?

 

Best regards,

 

Julien Gunther

Like 1

Like

2 comments
Best reply

Hello Julien,

 

I've used the following approach:

define("ContactSectionV2", ["ContactSectionV2Resources"], function(resources) {
	return {
		entitySchemaName: "Contact",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[
			{
        		"operation": "insert",
        		"name": "DataGridActiveRowTestButtonAdding",
				"parentName": "DataGrid",
				"propertyName": "activeRowActions",
        		"values": {
                                "className": "Terrasoft.Button",
                                "style":this.Terrasoft.controls.ButtonEnums.style.BLUE,
                                "markerValue": "TestButtonAddingAction",
                                "tag": "call",
                                "caption": resources.localizableStrings.TestButtonAddingRowButtonCaption
        		}
			}
		]/**SCHEMA_DIFF*/,
		methods: {
			onActiveRowAction: function(buttonTag, primaryColumnValue) {
				switch (buttonTag) {
					case "call":
						this.testClick(primaryColumnValue);
						break;
					default:
						this.callParent(arguments);
						break;
				}
			},
			testClick: function(recordId) {
				this.console.log("The button is clicked!");
			}
		}
	};
});

Using localizable resources of the schema. It seems that in your code the module doesn't load the localizable string for "BtnRowCreateCandidatureCaption" key. In my code the string value was loaded and the button is present in active row:

Best regards,

Oscar

Hello Julien,

 

I've used the following approach:

define("ContactSectionV2", ["ContactSectionV2Resources"], function(resources) {
	return {
		entitySchemaName: "Contact",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[
			{
        		"operation": "insert",
        		"name": "DataGridActiveRowTestButtonAdding",
				"parentName": "DataGrid",
				"propertyName": "activeRowActions",
        		"values": {
                                "className": "Terrasoft.Button",
                                "style":this.Terrasoft.controls.ButtonEnums.style.BLUE,
                                "markerValue": "TestButtonAddingAction",
                                "tag": "call",
                                "caption": resources.localizableStrings.TestButtonAddingRowButtonCaption
        		}
			}
		]/**SCHEMA_DIFF*/,
		methods: {
			onActiveRowAction: function(buttonTag, primaryColumnValue) {
				switch (buttonTag) {
					case "call":
						this.testClick(primaryColumnValue);
						break;
					default:
						this.callParent(arguments);
						break;
				}
			},
			testClick: function(recordId) {
				this.console.log("The button is clicked!");
			}
		}
	};
});

Using localizable resources of the schema. It seems that in your code the module doesn't load the localizable string for "BtnRowCreateCandidatureCaption" key. In my code the string value was loaded and the button is present in active row:

Best regards,

Oscar

Oscar Dylan,

 Thank you very much it works !

Show all comments

We have several processes using the popup element addon (https://marketplace.creatio.com/template/popup-element-business-processes).  The popup does not consistently display.  I can see the process runs correctly and shows the popup should display but it does not actually display in the UI in a Creatio hosted 7.18.4 environment.

 

In comparison, on a locally hosted instance of 7.18.2.1236, the popup does consistently display.

 

Please advise how we can get popups to consistently display.

Like 3

Like

9 comments

Hello Melanie,

 

Please keep the following best practices in mind when working with the popup element:

 

1. We recommend using the element after the elements of the User actions block. For example, Perform task, Pre-configured page, etc.

2. Avoid using several popup elements in a row. In this case, the user will see only the last element.

 

If you are already following the best practices, please send us a screenshot of the relevant popup element in the business process.

Hi Ivan,

We are following the best practices.  Here is a screen shot of the successfully executed process (though popup did not display), which is called when a user attempts to complete an activity.  We need to validate if information is filled out, and if not, display a popup of the missing information.

Again, this does consistently display in a locally hosted environment but does not consistently display on a cloud hosted environment.

 

Hello,

 

I am also having this problem with this popup element, same situation, element does not consistently display. It is also situation that it display locally but not in cloud environment.

Did you find solution for this problem?

 

Thank you in advance!

 

Best regards,

Marijana

 

 

Hello again,

 

Just found out solution for my problem. The problem was with the WebSockets ( there were not working on this cloud system). When I tried on other system it is working good. 

I am trying to utilize this plugin and am having the same problem. The process log shows that it run, but nothing appears on the front end for the user. We are using a cloud-based system. 

Has anyone found a solution for this yet?  We are still experiencing inconsistent popups in a cloud environment.

Still looking for a solution on this.  Please advise.

This is happening again for us.  Any updates yet?

Hi to all,

 

I recommend checking your browser extensions. Some of them, ad blockers in particular, could block pop-up windows in Creatio

Show all comments

Hi community,

 

I try to trigger a business process from a custom button. I in the post that I need the ProcessModuleUtilities to achieve that. Here is my code :

 

define("MTF_Candidat1Page", ["MultiChoiceMixin", "ProcessModuleUtilities"], function(ProcessModuleUtilities) { 
	return {
		entitySchemaName: "MTF_Candidat",
		...
		methods: {
			OnClickCreateInterview: function(){
				var args = {
					sysProcessName: "MTFtestbtn" // this is the name of my business process. It simply send me a mail for now.
				};
				ProcessModuleUtilities.executeProcess(args);
 
				this.showInformationDialog("Busniess process triggered"); // just to show something to let me know the function triggered properly the busniess process
			},
		},
		...
		diff: /**SCHEMA_DIFF*/[
				...
				{
				"operation": "insert",
				"name": "BtnCreateInterview",
				"values": {
					"layout": {
						"colSpan": 24,
						"rowSpan": 1,
						"column": 0,
						"row": 7
					},
					"itemType": 5,
					"classes": {
						"textClass": [
							"actions-button-margin-right"
						],
						"wrapperClass": [
							"actions-button-margin-right"
						]
					},
					"click": {
						"bindTo": "OnClickCreateInterview"
					},
					"tag": "OnClickCreateInterview",
					"caption": {
						"bindTo": "Resources.Strings.BtnCreateInterviewCaption"
					},
					"hint": {
						"bindTo": "Resources.Strings.BtnCreateInterviewHint"
					}
				},
				"parentName": "ProfileContainer",
				"propertyName": "items",
				"index": 7
			}
			...
		]/**SCHEMA_DIFF*/
}

 

Now when I click on the button on my candidate page I have this error :

 

"Uncaught TypeError: ProcessModuleUtilities is undefined"

 

Do you have other docs to trigger business processes on custom button press ?

 

Best regards,

 

Julien

Like 0

Like

2 comments
Best reply

Hi Julien,

 

Could you change your schema definition as the following (swap "MultiChoiceMixin" and "ProcessModuleUtilities")?

define("MTF_Candidat1Page", ["ProcessModuleUtilities", "MultiChoiceMixin"], function(ProcessModuleUtilities) 

regards,

 

Cheng Gong

Hi Julien,

 

Could you change your schema definition as the following (swap "MultiChoiceMixin" and "ProcessModuleUtilities")?

define("MTF_Candidat1Page", ["ProcessModuleUtilities", "MultiChoiceMixin"], function(ProcessModuleUtilities) 

regards,

 

Cheng Gong

Cheng Gong,

 It works, thank you !

Show all comments

We are using the devlabs Excel Reports Builder add-on and since the Creatio upgrade to Version 7.17 or 7.18 it is not possible anymore to upload templates. The upload in itself seems to go well as there is no error message indicating otherwise. But the checkbox "Template uploaded" is not set to True and after generating the report it is obvious that the template was not uploaded because none of the uploaded changes are in the generated report.

Like 0

Like

1 comments

Hi Oliver!

I recommend updating your add-on to the latest version as this issue was fixed in it. You can find the latest version on this page:

https://marketplace.creatio.com/app/excel-reports-builder-creatio

Show all comments

Hi Community!

 

Is there a way to prevent users from logging into the system?

For example if we do maintenance, deployments or have to restart the system?

 

Thanks,

Robert

Like 0

Like

1 comments

Hi Robert,



Unfortunately, there is no such functionality in our system. 



As a workaround, you can deactivate users by SQL queries.



Best regards,

Bogdan

Show all comments

Hi community,

 

I installed the multichoice package from the marketplace and I created a combobox but for some reason I'm not able to save the data once I filled the created combobox.

 

Here is my schema :

define("MTF_Candidat1Page", ["MultiChoiceMixin"], function() {
	return {
		entitySchemaName: "MTF_Candidat",
		attributes: {
			"UsrComboBox": {
				"dataValueType": Terrasoft.DataValueType.LOOKUP
			},
		},
		mixins: {
			MultiChoiceMixin: "Terrasoft.MultiChoiceMixin"
		},
		methods: {
			init: function() {
				this.callParent(arguments);
				this.mixins.MultiChoiceMixin.init.call(this, arguments);
			},
			getMultiChoiceEntitiesConfig: function() {
				items = {
					UsrComboBox: {
						mainEntitySchemaName: "MTF_Candidat",
						mainColumnName: "Lkp_Francais",
						relatedEntitySchemaName: "MTFcompetenceslinguistiques",
						relatedColumnName: "Name"
					}
				};
				return items;
			}
		},
		...
		diff: /**SCHEMA_DIFF*/[
		...
		{
				"operation": "insert",
				"parentName": "TabMTFInfosCandidatTabLabelGridLayoutd7450211",
				"propertyName": "items",
				"name": "UsrComboBox",
				"values": {
					"className": "Terrasoft.MultiChoiceCombobox",
					"layout": {
						"colSpan": 12,
						"rowSpan": 2,
						"column": 0,
						"row": 0,
						"layoutName": "TabMTFInfosCandidatTabLabelGridLayoutd7450211"
					},
					"bindTo": "UsrComboBox",
					"dataValueType": Terrasoft.DataValueType.ENUM,
					"labelConfig": {
						"caption": "Test ComboBox"
					}
				},
 
			},
		...
		]/**SCHEMA_DIFF*/
	};
});

"UsrComboBox" is an attribute I created in the attributes of this schema.

"MTF_Candidat" is an object that I created in the page wizard.

"Lkp_Francais" is the field ID for a lookup already defined in the page wizard. By default when I created Lkp_Francais, the connected lookup is "MTFcompetenceslinguistiques".

"MTFcompetenceslinguistiques" is a basic lookup with only the inherited fields

 

It produces this combobox :

The UI part it works fine :

But if I save my object, close it and reopen it, the data previously filled in the combobox are no longer there:

 

I tried to generate the source code for all the modified schemas in the advanced settings, then I recompiled everything and it still doesn't work.



Do you have any idea what is going on and what I can do to solve this problem?

 

EDIT : in my getMultiChoiceEntitiesConfig method I tried to change

mainColumnName: "Lkp_Francais"

to

mainColumnName: "Id"

as recommanded in https://marketplace.creatio.com/app/multiple-choice-field-setup-creatio under the installation part and this time when I save my object it just load indefinitely. I tried to change it to "MTFContactCandidat" which is a lookup connected to a Contact object and the result was the same,when I click on save it loads indefinitely.

 

Best regards,

 

Julien G.

Like 0

Like

2 comments
Best reply

Hi Julien,

This add on should work with a detail which linked with your main entity (MTF_Candidat) and the lookup (MTFcompetenceslinguistiques).

 

According to the information you mentioned, you only have a field in the MTF_Candidat which linked to MTFcompetenceslinguistiques.



Therefore, you need change your design by creating a detail which allows you to store multiple records from the lookup and link to the main object.

 

After that your item configuration should be something like this:

 

items = {
 UsrComboBox: {
		mainEntitySchemaName: "DetailObject", //Detail Object code
		mainColumnName: "ColumnConnectedToMainObject", //The column in the created detail which link to MTF_Candidat.
		relatedEntitySchemaName: "MTFcompetenceslinguistiques", //Lookup object,Your configuration is Correct.
		relatedColumnName: "ColumnConnectedToLookup" //The column in the created detail which link to MTFcompetenceslinguistiques
	}
};

regards,

 

Cheng Gong

Hi Julien,

This add on should work with a detail which linked with your main entity (MTF_Candidat) and the lookup (MTFcompetenceslinguistiques).

 

According to the information you mentioned, you only have a field in the MTF_Candidat which linked to MTFcompetenceslinguistiques.



Therefore, you need change your design by creating a detail which allows you to store multiple records from the lookup and link to the main object.

 

After that your item configuration should be something like this:

 

items = {
 UsrComboBox: {
		mainEntitySchemaName: "DetailObject", //Detail Object code
		mainColumnName: "ColumnConnectedToMainObject", //The column in the created detail which link to MTF_Candidat.
		relatedEntitySchemaName: "MTFcompetenceslinguistiques", //Lookup object,Your configuration is Correct.
		relatedColumnName: "ColumnConnectedToLookup" //The column in the created detail which link to MTFcompetenceslinguistiques
	}
};

regards,

 

Cheng Gong

Cheng Gong,

 

Thanks for your answer!

 

 

Show all comments