Hello team, 

While compiling i get the following error

2023-02-28 00:25:54,747 [75] ERROR IIS APPPOOL\test_site Build BuildInternal - An error occured while running dotnet cli

System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified

   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)

   at Terrasoft.Core.Compilation.ProjectBuilder.BuildInternal(String projectFilePath, String tempPath, BuildCommandParameters parameters).

 

I have already tried the suggestion in this thread : https://community.creatio.com/questions/buildcompile-error

and still keep getting the same error

Sasori

Like 0

Like

3 comments

Sasori Oshigaki



Can you please share the complete error captured in log file?

Hi Bhoobalan Palanivelu,

The one mentioned is the complete error in the BuildLog file

Regards

Make sure the IIS AppPool user has full write access to CreatioWebroot\Terrasoft.WebApp\Configuration

Ryan

Show all comments

Hi 

Why when I add some attachments to case in mobile app, i didn't see this attachments on local instance on PC? (case is visible but no attachment)

Like 0

Like

1 comments

Hello,

 

This issue can happen if a user works in a mobile application in an online mode while their connection is not stable. 

 

Meanwhile, it would be better for those users who are working from mobile with a bad connection to stay in an offline mode and sync their apps when the connection gets better. 



Please contact our support team - if the issue still reproduces.

Show all comments

Hi Community,



How to convert the following SQL query into ESQ so that it can be used in the Script task Process element. 

 

SELECT TOP 1 SalesOwnerId 

FROM [Lead] 

WHERE SBLBranchLocationId ='060183EE-C2F3-4EDF-853C-59E28026EAD6' 

  AND LeadTypeId='669BC3A8-DFDB-4E53-8AAE-B643C2D6C677' 

  AND SalesOwnerId IS NOT NULL 

GROUP BY SalesOwnerId 

ORDER BY COUNT(SalesOwnerId) ASC

Like 0

Like

1 comments

Hi,

If you specifically need to use ESQ then take a look at this discussion where this topic was discussed.

However, in your case you can use Select class, with it you can easily use expressions like GROUP BY or ORDER BY.

Show all comments

I am getting meaningless Compilation errors , any ideawhat it is about ? 

namespace Terrasoft.Core.Process
{
 
	using System;
	using System.Collections.Generic;
	using System.Collections.ObjectModel;
	using System.Drawing;
	using System.Globalization;
	using System.Text;
	using Terrasoft.Common;
	using Terrasoft.Configuration;
	using Terrasoft.Core;
	using Terrasoft.Core.Configuration;
	using Terrasoft.Core.DB;
	using Terrasoft.Core.Entities;
	using Terrasoft.Core.Process;
	using Terrasoft.Core.Process.Configuration;
	using Terrasoft.UI.WebControls.Utilities;
 
	#region Class: UsrProcess_7b09d28TravelAgencyDev1MethodsWrapper
 
	/// <exclude/>
	public class UsrProcess_7b09d28TravelAgencyDev1MethodsWrapper : ProcessModel
	{
 
		public UsrProcess_7b09d28TravelAgencyDev1MethodsWrapper(Process process)
			: base(process) {
			AddScriptTaskMethod("ScriptTask2Execute", ScriptTask2Execute);
			AddScriptTaskMethod("ScriptTask3Execute", ScriptTask3Execute);
			AddScriptTaskMethod("ScriptTask4Execute", ScriptTask4Execute);
		}
 
		#region Methods: Private
 
		private bool ScriptTask2Execute(ProcessExecutingContext context) {
			string sender="AutoAddVisits";
			string msgbody="something";
			MsgChannelUtilities.PostMessage(UserConnection,sender,msgbody);
			return true;
		}
 
		private bool ScriptTask3Execute(ProcessExecutingContext context) {
			var frequency="frequencyInDays";
			switch (frequency) {
			         case "Daily":
			            Set(frequency, 1);
			                        break;
			                    case "Weekly":
			                        Set("frequency", 7);
			                        break;
			                    case "Monthly":
			                        Set("frequency", 30);
			                        break;
			                    default:
			                       break;
			 }
			return true;
		}
 
		private bool ScriptTask4Execute(ProcessExecutingContext context) {
			var travelOfferId = "TravelId"; 
			var travelOfferSchemaName = "TravelOffers";
			var travelOfferEsq = new EntitySchemaQuery(UserConnection.EntitySchemaManager, travelOfferSchemaName);
			travelOfferEsq.addColumn("TravelOfferFrequency");
			var travelOffer = travelOfferEsq.getEntity(travelOfferId);
 
			var tourSchemaName = "Tours";
			var tourEsq = new EntitySchemaQuery(UserConnection.EntitySchemaManager, tourSchemaName);
			var tourCollection = new Collection();
 
			var currentDate = new Date();
			var firstTour = tourCollection.add(tourEsq.createEntity(UserConnection));
			firstTour.set("TravelOffer", travelOfferId);
			firstTour.set("TourDate", currentDate);
 
			var travelOfferFrequency = travelOffer.get("UsrTravelOfferFrequencyId").displayValue;
			var tourDate = currentDate;
			for (var i = 1; i < 8; i++) {
			    switch (travelOfferFrequency) {
			        case "Daily":
			            tourDate.setDate(tourDate.getDate() + 1);
			            break;
			        case "Weekly":
			            tourDate.setDate(tourDate.getDate() + 7);
			            break;
			        case "Monthly":
			            tourDate.setDate(tourDate.getDate() + 30);
			            break;
			        default:
			            throw new UnknownException("Invalid travel offer frequency");
			    }
			    var tour = tourCollection.add(tourEsq.createEntity(UserConnection));
			    tour.set("TravelOffer", travelOfferId);
			    tour.set("TourDate", tourDate);
			}
 
			tourCollection.saveAll({
			    isExternal: true,
			    success: function() {
			        // The tour entities have been saved
			    },
			    failure: function() {
			        // An error occurred while saving the tour entities
			    }
			});
		}
 
		#endregion
 
	}
 
	#endregion
 
}

 

Like 0

Like

2 comments

Hello,

We need more information to solve your problem, please contact our support team - support@creatio.com

Pavlo Sokil,

I sent you a mail 

Show all comments

Hello Community, 

 

I wanted to perform two actions on click of a button

1. Saves the fields in the tab page 

2. Navigate to next tab 

Right now we are using the crt.SaveRecordRequest. This only saves the page. 

 

Any suggestions is really helpful 

 

Thanks

Gargeyi.G

Like 0

Like

4 comments

Hello,

This article will show you how to navigate to a new page on a Freedom UI page: 

https://customerfx.com/article/navigating-to-a-page-via-code-in-a-creat…

If you want to open an edit page for a record, or an add page, this article outlines how to do that: 

https://customerfx.com/article/opening-an-edit-page-to-add-or-edit-a-re…

Ryan

Also, as far as having the button trigger both - there are two routes you can take. 

Route 1 - If you'd always go to this other page after saving, you could just do that when the save request is triggered. This article shows how to listen for when the page is saved, then you could navigate to the other page from there: https://customerfx.com/article/adding-code-to-the-save-event-of-a-creat…

Route 2 - If you're only wanting to save, then go to this other page, when your own button is clicked, and not for all saves, then you can wire up your own handler for your button. This article shows how to to that: https://customerfx.com/article/adding-a-button-to-execute-custom-code-o… In the handler, you'd save the page, then navigate to the other page. If you go this route (creating a custom request for your button). It would look like this:

{
	request: "cfx.clickMeButtonClicked",
	handler: async (request, next) =&gt; {
		// make sure you've added the "@creatio-devkit/common" as mentioned in the articles			
		const handlerChain = sdk.HandlerChainService.instance;
 
		// first save the record
		await handlerChain.process({
			type: "crt.SaveRecordRequest",
			$context: request.$context
		});
 
		// now navigate to the other page, this navigates to the orders section
		await handlerChain.process({
			type: "crt.OpenPageRequest",
			schemaName: "OrderSectionV2",
			$context: request.$context
		});
 
		return await next?.handle(request);
	}
}

Ryan

Ryan Farley,

Please note that it's best to pass context to each handlerChain.process call. So, in your example, the second call should be:

		// now navigate to the other page, this navigates to the orders section
		await handlerChain.process({
			type: "crt.OpenPageRequest",
			schemaName: "OrderSectionV2",
			$context: request.$context
		});

 

Oleksandr Khardikov,

Thanks for that. I've updated the code in my reply for completeness and also the articles on my website.

Ryan

Show all comments

We are trying to implement the MiContact Center connector for Creatio but are having some issues.

 

We can make outgoing calls (using the phone icon) but the system is not recognising incoming calls.

 

Can someone advise as to what we should see in the UI when making and receiving calls, and also what I need to do within the app to make this function fully?

Like 0

Like

1 comments

Hi Kieron,

 

The connector is compatible with MiContact Center version 9.0. Could you tell us the name of your telephony product and its version?

Show all comments

Hi Community,

 

Any idea how to display the "Details" record in email template. In Template designer there is option to get data from Related Objects. However, there is no way to add records from child table.

 

 

Like 1

Like

1 comments

Hi Fulgen,

This marketplace add-on from SalesUp might fit your needs to add one-to-many data in an Email template: 

https://marketplace.creatio.com/app/salesup-enhanced-template-macros-cr…

Ryan

Show all comments

Hello Community, 

 

Is it possible to bind the title of the form page from "New Record"  to a field value on load of a page in freedom UI.

 

Thanks

Gargeyi.G

Like 0

Like

1 comments

Hello,

You can change that by adding a handler like this - note this will change the value from "New record" when adding a new record for the page:

handlers: /**SCHEMA_HANDLERS*/[
	{
		request: "crt.HandleViewModelInitRequest",
		handler: async (request, next) =&gt; {
			const result = await next?.handle(request);
 
			const cardState = await request.$context.CardState;
			if (cardState == "add" || cardState == "copy") {
				request.$context.HeaderCaption = "Add a new something";
			}
 
			return result;
		}
	}
]/**SCHEMA_HANDLERS*/,

As far as binding it to some page value, you could use the same but first get a value from the page. Something like this:

handlers: /**SCHEMA_HANDLERS*/[
	{
		request: "crt.HandleViewModelInitRequest",
		handler: async (request, next) =&gt; {
			const result = await next?.handle(request);
 
			const cardState = await request.$context.CardState;
			if (cardState == "add" || cardState == "copy") {
				request.$context.HeaderCaption = "Add a new something";
			}
			else {
				// get a value from the page
				const someValue = request.$context.someAttributeOnThePage;
				request.$context.HeaderCaption = someValue;
			}
 
			return result;
		}
	}
]/**SCHEMA_HANDLERS*/,

Ryan

Show all comments

Perform verification whenever a user adds or modifies a daily tour offer as follows: if the total number of active daily tours exceeds the system setting value , saving a record should not be permitted. Instead, a user should receive a message informing that no more than “N” daily tours can be active at a time. “N” is the system setting value.

 

Here is my code : 

asyncValidate: function(callback, scope) {
    this.callParent([
        function(response) {
            if (!this.validateResponse(response)) {
                return;
            }
            this.validateTravelOfferTour(function(response) {
                if (!this.validateResponse(response)) {
                    return;
                }
                callback.call(scope, response);
            }, this);
        }, this
    ]);
},
 
validateTravelOfferTour: function(callback, scope) {
    // Fetch the Maximum Number Of Daily Periodical Editions System Setting
    var mySetting = Terrasoft.SysSettings.cachedSettings.Usr_Max_Number_Activity_Tours;
    var FrequencyObject=this.get("UsrTravelOfferFrequency");
    if(!FrequencyObject){
        if(callback){
            callback.call(scope,{
                success:true
            });
        }
        return;
    }
    var FrequencyId=FrequencyObject.value;
    //create query
    var esq=this.Ext.create("Terrasoft.EntitySchemaQuery",{
        rootSchemaName:"UsrTravelOffers"
    });
    //esq.addAggregationSchemaColumn("UsrActive",Terrasoft.AggregationType.)
    var ActivityFilter = esq.createColumnFilterWithParameter(0, "UsrActive", "1");
    var frequencyFilter=esq.createColumnFilterWithParameter(0,"UsrTravelOfferFrequency",FrequencyId);
    esq.filters.addItem(frequencyFilter);
    esq.filters.addItem(ActivityFilter);
 
    // Aggregation to get the Count of resulting Query
    esq.addAggregationSchemaColumn("UsrActive", Terrasoft.AggregationType.COUNT, "ActiveOffers");
    //run query
    // Get the entire esq result colelction
    esq.getEntityCollection(function(result) {
        if (result.success && result.collection) {
            // Store the Count of Filtered Records to a variabble
            var items = result.collection.getItems();
            if(items.length>0){
                esqresult=items[0].get("ActiveOffers");
            }
            if(esqresult==mySetting){
                if(callback){
                    callback.call(this,{
                        success:false,
                        message:"no more than 3 daily tours can be active at a time."
                    });
                }
            }else
                if(callback){
                    callback.call(scope,{
                        success:true
                    });
                }
        }
    },this);
},

and this is the error :

{"responseStatus":{"ErrorCode":"InvalidObjectStateException","Message":"Condition with type \"Between\" must contain two expressions in the left part.","Errors":[]},"rowsAffected":-1,"nextPrcElReady":false,"success":false}

 

Like 0

Like

3 comments
Best reply

Since it's more of a question about the ESQ, the first parameter for createColumnFilterWithParameter is a value from Terrasoft.ComparisonType. You have a 0 (zero) there, which means a BETWEEN. Instead it should be 3, which is EQUAL. It's better to use the value Terrasoft.ComparisonType.EQUAL so the code is easier to read.

var ActivityFilter = esq.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "UsrActive", "1");
var frequencyFilter = esq.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL,"UsrTravelOfferFrequency", FrequencyId);

Ryan

Hello,

 

Thanks for your question. Please note that posting certification questions is not encouraged on our platform.

 

Thank you for understanding!

 

Best regards,

Anastasiia

Since it's more of a question about the ESQ, the first parameter for createColumnFilterWithParameter is a value from Terrasoft.ComparisonType. You have a 0 (zero) there, which means a BETWEEN. Instead it should be 3, which is EQUAL. It's better to use the value Terrasoft.ComparisonType.EQUAL so the code is easier to read.

var ActivityFilter = esq.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "UsrActive", "1");
var frequencyFilter = esq.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL,"UsrTravelOfferFrequency", FrequencyId);

Ryan

Ryan Farley,Thank you that was it.

Show all comments

Hi Community, 



Is there anyone who might be able to help me with the code below? I am trying to filter a lookup column, by the value of another lookup column on the same page.

Specifically, my column "PrimaryContact" should be filter Contacts where the "Account" is equal to the "UsrCompanyName" of the same page. 



I've tried many things in the "Value" for rightExpression, but can't seem to get it to work. The rest of the code seems okay because if I add a Guid of an Account to the value, it filters fine. 



Thanks!



 

"LookupAttribute_j53fgnq_List_BusinessRule_Filter": {
					"value": {
						"filterType": 6,
						"isEnabled": true,
						"items": {
							"CustomFilters": {
								"filterType": 6,
								"isEnabled": true,
								"items": {
									"cb855fc4-4526-475a-beea-8e41a7f5a439": {
										"comparisonType": 11,
										"filterType": 1,
										"isEnabled": true,
										"leftExpression": {
											"expressionType": 0,
											"columnPath": "Account"
										},
										"rightExpression": {
											"expressionType": 2,
											"parameter": {
												"dataValueType": 1,
												"value": "$PDS.UsrCompanyName.Id"
											}
										},
										"trimDateTimeParameterToDate": false
									}
								}
							}
						}
					}
				}, 
 

 

Like 2

Like

4 comments
Best reply

Hi Harry,

It would be easier to handle the request for when the lookup requests its data source and then add the filters to that request since you'd have access to page data.

When the lookup is activated (user clicks the dropdown) it sends a crt.LoadDataRequest. You can listen for that and then add the filters there. The request would look something like this: 

handlers: /**SCHEMA_HANDLERS*/[
	{
		request: "crt.LoadDataRequest",
		handler: async (request, next) =&gt; {
		    // the data soruce name will be the lookup attribute name + "_List_DS"
			if (request.dataSourceName !== "LookupAttribute_46uzwvy_List_DS") {
				return await next?.handle(request);
			}
 
			// get other page values
			const compId = request.$context.UsrCompanyName.value;
 
			// add filter
			request.parameters.push({
				type: "filter",
				value: {
						"filterType": 6,
						"isEnabled": true,
						"items": {
							"CustomFilters": {
								"filterType": 6,
								"isEnabled": true,
								"items": {
									"cb855fc4-4526-475a-beea-8e41a7f5a439": {
										"comparisonType": 11,
										"filterType": 1,
										"isEnabled": true,
										"leftExpression": {
											"expressionType": 0,
											"columnPath": "Account"
										},
										"rightExpression": {
											"expressionType": 2,
											"parameter": {
												"dataValueType": 1,
												"value": compId
											}
										},
										"trimDateTimeParameterToDate": false
									}
								}
							}
						}
			});
 
			return await next?.handle(request);
		}
	}
]/**SCHEMA_HANDLERS*/,

As a side note, for the filter, I believe something along these lines should work. It's close the working, but the end result request shows in the network tab that the filter key and filter values get added separately to the filters array causing a server error. Hopefully we'll get more details on this sort of thing soon:

(Note, the below doesn't work yet, but sharing it in case someone else gets it to work)

handlers: /**SCHEMA_HANDLERS*/[
	{
		request: "crt.LoadDataRequest",
		handler: async (request, next) =&gt; {
		    // data soruce name is lookup attribute + "_List_DS"
			if (request.dataSourceName !== "LookupAttribute_46uzwvy_List_DS") {
				return await next?.handle(request);
			}
 
			let filters = new sdk.FilterGroup();
			filters.addSchemaColumnFilterWithParameter(sdk.ComparisonType.Equal, "Type.Name", "Partner");
 
			// add filter
			request.parameters.push({
				type: sdk.ModelParameterType.Filter,
				value: filters
			});
 
			return await next?.handle(request);
		}
	}
]/**SCHEMA_HANDLERS*/,

Ryan

Hi Harry,

 

In case you doubt about the filtration on the column you can create a test list based on the object of your lookup column and specify the needed filtration there:

and

save the page and open the code. As a result you will see an autogenerated code of the working filtration that then can be applied to the column:

HI Oleg, 



Thank you. This example works well when applying a static filter. However, it seems not to work the same when trying to apply filter by page data. 



Do you have any example how to translate this same method so that I can filter a lookup column by page data? 



Thank you 

Hi Harry,

It would be easier to handle the request for when the lookup requests its data source and then add the filters to that request since you'd have access to page data.

When the lookup is activated (user clicks the dropdown) it sends a crt.LoadDataRequest. You can listen for that and then add the filters there. The request would look something like this: 

handlers: /**SCHEMA_HANDLERS*/[
	{
		request: "crt.LoadDataRequest",
		handler: async (request, next) =&gt; {
		    // the data soruce name will be the lookup attribute name + "_List_DS"
			if (request.dataSourceName !== "LookupAttribute_46uzwvy_List_DS") {
				return await next?.handle(request);
			}
 
			// get other page values
			const compId = request.$context.UsrCompanyName.value;
 
			// add filter
			request.parameters.push({
				type: "filter",
				value: {
						"filterType": 6,
						"isEnabled": true,
						"items": {
							"CustomFilters": {
								"filterType": 6,
								"isEnabled": true,
								"items": {
									"cb855fc4-4526-475a-beea-8e41a7f5a439": {
										"comparisonType": 11,
										"filterType": 1,
										"isEnabled": true,
										"leftExpression": {
											"expressionType": 0,
											"columnPath": "Account"
										},
										"rightExpression": {
											"expressionType": 2,
											"parameter": {
												"dataValueType": 1,
												"value": compId
											}
										},
										"trimDateTimeParameterToDate": false
									}
								}
							}
						}
			});
 
			return await next?.handle(request);
		}
	}
]/**SCHEMA_HANDLERS*/,

As a side note, for the filter, I believe something along these lines should work. It's close the working, but the end result request shows in the network tab that the filter key and filter values get added separately to the filters array causing a server error. Hopefully we'll get more details on this sort of thing soon:

(Note, the below doesn't work yet, but sharing it in case someone else gets it to work)

handlers: /**SCHEMA_HANDLERS*/[
	{
		request: "crt.LoadDataRequest",
		handler: async (request, next) =&gt; {
		    // data soruce name is lookup attribute + "_List_DS"
			if (request.dataSourceName !== "LookupAttribute_46uzwvy_List_DS") {
				return await next?.handle(request);
			}
 
			let filters = new sdk.FilterGroup();
			filters.addSchemaColumnFilterWithParameter(sdk.ComparisonType.Equal, "Type.Name", "Partner");
 
			// add filter
			request.parameters.push({
				type: sdk.ModelParameterType.Filter,
				value: filters
			});
 
			return await next?.handle(request);
		}
	}
]/**SCHEMA_HANDLERS*/,

Ryan

Thank you, Ryan. That worked perfectly. 

Show all comments