Is it possible to trigger the Freedom UI Live Data Refresh mechanism (LiveEditing feature) for a specific record from C# code? We have a C# process that is updating data directly in the database for performance reasons, but in certain circumstances we may want to trigger the Live Data Refresh of the record(s). Is this possible in any way? Or do we have to implement a workaround by refreshing from JS code when we think we may have to (so would be over-refreshing and not using the Live Data refresh mechanism).

Like 0

Like

1 comments
Best reply

You can see how that feature works by looking at the "LiveEditingBaseEntityEventListener" source code schema. In initial versions you could see they were just using MsgChannelUtilities.PostMessage and the message name, but in 8.1.2 that has been abstracted away. Still you could execute the same way as implemented in that schema.

Ryan

You can see how that feature works by looking at the "LiveEditingBaseEntityEventListener" source code schema. In initial versions you could see they were just using MsgChannelUtilities.PostMessage and the message name, but in 8.1.2 that has been abstracted away. Still you could execute the same way as implemented in that schema.

Ryan

Show all comments

Hi Community,

 

I am currently working on Process elements  in Creatio. However, I find that the Save and Publish process with Script Task Element is taking longer time than expected, and I'm looking for ways to speed up this process.

 

Has anyone faced similar challenges and found effective solutions? If so, please share your experiences.

 

Best Regards,

Ajay Kuthe

 

 

Like 1

Like

7 comments
Best reply

Gareth Osler,

You can add the Creatio NuGet package to your local Visual Studio project for the Creatio/Terrasoft references also (without a local install). https://www.nuget.org/packages/CreatioSDK

Ryan

I have the same question, especially with one instance having a compile time of 10 minutes.

 

There is some documentation on using external IDEs here External IDEs | Creatio Academy.

 

The following looks interesting, but I'm not sure if a local Creatio instance is required:

Develop C# code in a custom project | Creatio Academy

Develop C# code in a custom project | Creatio Academy / Write C# code for Creatio in the cloud

If you turn on the option in your package for it to compile to it's own assembly then it should take less time since it's only compiling your package and not the entire system.

Other than that, developing externally using tools such as clio would speed the process up. 

Some of scripts that are used in many processes can be transformed into User task

Some best practices documentation videos, updated / new e-learning courses would be great in order to maximise the development in nocode and in code with Creatio  (video courses which can also show how to maximize the use of different tools like clio etc...) the amount of information at the moment is still disparate and super light. 

To build an assembly the Terrasoft libraries are needed.  A local Creatio install would be needed (unless there is some other way).

 

Gareth Osler,

You can add the Creatio NuGet package to your local Visual Studio project for the Creatio/Terrasoft references also (without a local install). https://www.nuget.org/packages/CreatioSDK

Ryan

Ryan Farley,

 

Following the instructions from Write C# code for Creatio in the cloud I'm getting the following error running Executor.exe

 

.\Executor.exe

Unhandled Exception: System.Net.CookieException: The 'Value'='Lax,.ASPXAUTH' part of the cookie is invalid.
   at System.Net.Cookie.VerifySetDefaults(CookieVariant variant, Uri uri, Boolean isLocalDomain, String localDomain, Boolean set_default, Boolean isThrow)
   at System.Net.CookieContainer.Add(Uri uri, Cookie cookie)
   at Executor.Program.TryLogin(String userName, String userPassword, String authServiceUri)
   at Executor.Program.Login()
   at Executor.Program.Main(String[] args)


The instructions are essentially to build an assembly locally and then I think upload it to the cloud instance using Executor.exe.  It looks as though it is not able to log in to the cloud instance due to an invalid cookie value.  I can't think of  a way round that.

 

[Edit] Apart from upload the assembly manually, would only take a few seconds!

 

[Edit] Could clio CI/CD be used to automate deployment?

 

Show all comments

Hi Creatio Community,

 

I hope you're all doing well. I have question with managing app updates and would appreciate your insights.

 

Scenario: I have developed an app and released version 1.0 on the Creatio Marketplace. Some clients have installed this version and made custom changes to the app. 

Now, I am preparing to release version 1.1 with new features and bug fixes. My concern is that when clients update to version 1.1, their custom changes overwritten or not?

 

1] What are the best practices to ensure client-specific changes are not lost during the update?

 

2] Are there any tools or features within Creatio that can help manage and merge client customizations with new updates?

 

Thank you in advance for your assistance and suggestions.

 

Best Regards,

Ajay Kuthe

Like 3

Like

1 comments
Best reply

Hi Ajay,

 

Let's look at how the customization process works in general. 

 

When a customer makes any changes to the installed application, your core logic remains unchanged. Instead, the app is extended with a new package where replaced schemas are created, inheriting your core schemas. When you make new changes to the app and customize these core schemas, after delivering a new version to the client, only those core schemas will be updated. The customer's inherited schemas will remain unchanged.

 

Therefore, custom changes will not be overwritten. However, we recommend supporting backward compatibility to avoid breaking custom changes after delivery.
 

If you are going through the update process together with the client, we suggest using the delivery process article to build a safe delivery process.

Hi Ajay,

 

Let's look at how the customization process works in general. 

 

When a customer makes any changes to the installed application, your core logic remains unchanged. Instead, the app is extended with a new package where replaced schemas are created, inheriting your core schemas. When you make new changes to the app and customize these core schemas, after delivering a new version to the client, only those core schemas will be updated. The customer's inherited schemas will remain unchanged.

 

Therefore, custom changes will not be overwritten. However, we recommend supporting backward compatibility to avoid breaking custom changes after delivery.
 

If you are going through the update process together with the client, we suggest using the delivery process article to build a safe delivery process.

Show all comments

Is it possible to intercept using some request handler the event when a user clicks on the green "Complete" button on a Next Steps tile? This is the button in the "next-step-tile-actions" div on the page which only appears when you hover over the next step tile:

 

It would be vey helpful to be able to run some custom code when this button is clicked - in our case, we need it to save the main page record before actioning this next step, as completing the next step might automatically transition the Lead to the next stage, losing any data entered by the user.

Like 220

Like

6 comments

None of the following handlers are triggered by clicking this button, maybe I've missed some candidates but these are the ones I've tried so far:

crt.ChangeNextStepsStateRequest

crt.OpenPageRequest

crt.UpdateRecordRequest

crt.CreateRecordRequest

Also tried "brute forcing" it by overriding every handler I could find in the Creatio code, but literally nothing fires when clicking that button! Not even something like the page's crt.HandleViewModelPauseRequest (since it's a modal popup, I guess the full page doesn't actually pause like it would when navigating to a another page through clicking a lookup for example). Hopefully I've missed something, triggering some action on clicking that button would be useful.

Any thoughts/knowledge on how such a thing could be achieved?

Hi Harvey! 

 

Unfortunately, at the moment, there is no way to intercept the event of clicking on the Next-steps tile buttons. This button can call different requests depending on the type of tile, and these requests are called without the view model context, which will not allow us to intercept them from the card and use them to save card data.

 

We have registered your idea, and the R&D team has already planned the task for this improvement - they will create a special output event for the Next-steps component. This functionality will be available in future releases.

 

Thank you for making our product better!

 

Best regards,

Natalia

Thank you for the information Natalia, this would be a welcome improvement!

Hi Natalia, is there any expected timeline for this improvement known yet? Do you have a reference for the planned task for later follow-up?

Show all comments

Just a quick PSA - either 8.1.2 or 8.1.3 breaks the ability we had before of being able to set Page Parameter values in the crt.HandleViewModelInitRequest request handler, since in the newer versions it appears the value is reset back to the default (similar to how fields based over table columns are) at some time after the init handler runs. This is quite frustrating, as it's reducing the number of options we have for setting values in the code where required (which it still often is with the current options for no code development).

 

A workaround that Ryan Farley has previous mentioned using for setting field values by using a javascript timeout can be used for this too, e.g.

setTimeout(() => {request.$context.TextPageParameter = "Test value";}, 300);
Like 2

Like

8 comments

Hello, Harvey

I also had such an isuue but I resolved it by calling parameter initialization after let result =  await next?.handle(request); And then in the end return result; 

Andrii Orlenko,

 

Mine was already being initialised after awaiting the result of handling the request, so it might be that sometimes this takes long enough to be ok but not always (so would introduce a race condition).

Harvey Adcock,

Thank you for the provided information!
The problem is already registered on the R&D team, and we hope to see the fix in future releases.

Anhelina,

Thank you. 

Just an FYI, I've been reporting this since 8.0.10 (see #SR-01234445). I was told this would be resolved in "the nearest releases (8.1.1-8.1.2)", however, it's still an issue in 8.1.3 without a commitment from Creatio on a specific timeframe for a resolution. This is a pretty huge pain point so it's disappointing that it's still a problem. I do love Freedom UI (and I'll take it any day over classic!) but there's been many instances of my code breaking along the way with new versions and it sometimes seems less urgent for fixes for issues that go beyond the "no code" customizations.

Ryan

Ryan Farley,

I checked that case before replying to Harvey and asked the responsible team to raise the priority for this task. I apologize for the delay and hope to see the fix soon.
Meanwhile, they shared one more workaround, which is better to use with parameters:

add the handler on parameter changing and rewrite it when the default value has appeared:

Example

Anhelina,

Yes, this approach does work if all you need when the form is initialized is to work with a single value on the page. However, that is often not the case and each property initialization can happen at slightly different times, so referencing other attributes in this same handler might not work, depending on the timing of the various attributes being loaded/initialized. Adding a separate handler for each attribute you need to work with can get messy quick.

Ryan

What I think would be nice/match the existing patterns would be to have some new request handler that does the setting of default values on the page, something like "crt.HandleAttributeInitRequest", which would perform the OOTB platform's setting of these values in the next?.handle(request) and then after awaiting the result of that a developer could set their own defaults for fields they need to, which wouldn't be overwritten (since the defaults had already been set).

 

It would also be nice to be able to "silently" set these default values (like you could in Classic UI) so that setting values in that request handler wouldn't cause the "are you sure" dialog to appear if a user closes the page without actually modifying the data themselves. Actually it would be nice to be able to do that generally from within request handler code.

Hi, is there any update on the matter? 
Still when you're trying to read the attributes on crt.HandleViewModelInitRequest the attributes aren't initialized and are all undefined

Show all comments

It looks like in 8.1.3, when clicking the magnifying glass on a lookup field which is configured to show the lookup page modal popup, the handler crt.OpenSelectionWindowRequest is now called instead of crt.OpenLookupPageRequest. Is is the case that the old handler has been swapped for the new one? Why has this been done? And are there any important differences to be noted? It's broken some of our client's custom code in the upgrade, and from a surface view it looks like it works in much the same way as the old handler and that simply swapping the code to use the new handler instead of the old works, but don't want to make any assumptions on that. Anybody have any insight on this?

Like 2

Like

10 comments

Hmm. Good find. I’ll have some broken customizations as well. Hopefully we’ll get an official word about the change. This isn’t the first time I’ve had things break from changes to core Freedom UI things. I like using Freedom UI but at times it feels like a moving target. We need some commitment from Creatio about avoiding breaking changes. 
Ryan

Hi Harvey, 

I just tested this in an 8.1.3.6734 system and both "crt.OpenSelectionWindowRequest" and "crt.OpenLookupPageRequest" did open the selection/lookup window for me. However, using the results seemed to work differently depending on which request I used, it didn't work to just change the request name and leave the rest of the code as-is. So they do appear to possibly be slightly different requests, at least from my very limited tests so far 🤷🏼‍♂️

Ryan

Interesting, thanks for the additional info Ryan! For triggering the lookup page from code I think we'll stick with the original method for now then.

 

But a little PSA for anyone wondering why their code overriding the crt.OpenLookupPageRequest handler to intercept and add filters/perform other logic when a user triggers a lookup page on a lookup field configured to view as "Selection window" rather than dropdown list, they should now be overriding crt.OpenSelectionWindowRequest instead. Hopefully we'll get some clarification on why this has changed and any implications.

Harvey Adcock,

8.1.3 is the first release with this API published, and Creatio mentioned the API for Freedom UI selection window in the 8.1.3 release notes. At the same time, we left it without changes so as not to break possible customizations with the old unpublished API. However, the old API is effectively deprecated, and the new API should be used from now on.

The full article for the Academy is almost ready and will be officially published soon.
Here is part of main information (maybe some parts will be changed, that's why please follow the updates): 
In order to open the lookup window, you have to use crt.OpenSelectionWindowRequest:
 

/**
 * @publicApi
 */
@CrtRequest({
    type: 'crt.OpenSelectionWindowRequest',
})
export class OpenSelectionWindowRequest extends BaseRequest {
    public itemAttributeName?: string;
    public itemsAttributeName?: string;
    /**
     * @publicApi
     */
    public entitySchemaName?: string;
    /**
     * @publicApi
     */
    public schemaName?: string;
    /**
     * @publicApi
     */
    public filtersConfig?: FiltersConfig;
    /**
     * @publicApi
     */
    public features?: PageLookupFeatures;
    /**
     * @publicApi
     */
    public selectionState?: SelectionState;
    /**
     * @publicApi
     */
    public afterClosed?: (result: SelectionWindowResult) => void;
    /**
     * @publicApi
     */
    public caption?: LocalizableString;
}

 

Add the following code to your custom handler:

handlers: /**SCHEMA_HANDLERS*/[
			{
				request: "usr.OpenLookupRequest",
				handler: async (request, next) => {
					devkit.HandlerChainService.instance.process({
						type: "crt.OpenSelectionWindowRequest",
						scopes: [...request.scopes],
						$context: request.$context,
						entitySchemaName: "Contact",
						// caption: 'Responsible',
						schemaName: 'CustomLookupPage',
						itemAttributeName: 'LookupAttribute_2mnilrq',
						// itemsAttributeName: 'Contact_List',
						afterClosed: async (result) => {
							if (!result.canceled) {
								const lookupValues = await result.getLookupValues();
								const value = lookupValues[0];
								if (value) {
									alert(value?.displayValue ?? '');
								}
							}
						},
						filtersConfig: {
							filterAttributes: [
								{
									name: 'MyFilter',
									loadOnChange: false
								}
							],
							attributesConfig: {
								MyFilter: {
									value: {
										"items": {
											"29e16d42-36f1-4e04-9029-4321cbb2494d": {
												"filterType": 1,
												"comparisonType": 11,
												"isEnabled": true,
												"trimDateTimeParameterToDate": false,
												"leftExpression": {
													"expressionType": 0,
													"columnPath": "Name"
												},
												"isAggregative": false,
												"dataValueType": 1,
												"rightExpression": {
													"expressionType": 2,
													"parameter": {
														"dataValueType": 1,
														"value": "Super"
													}
												}
											}
										},
										"logicalOperation": 0,
										"isEnabled": true,
										"filterType": 6,
										"rootSchemaName": "Contact"
									}
								}
							}
						}
					});
					return next?.handle(request);
				}
			}
		]/**SCHEMA_HANDLERS*/,

where

entitySchemaName - the name of the entity schema whose data is displayed in the lookup window. Optional parameter. If not specified, the data source is taken from the attribute specified in itemAttributeName

caption - optional parameter, displayed in the window title. If caption is not specified, the caption is taken from the attribute specified in the itemAttributeName parameter. If itemAttributeName is not specified, then from the entity schema.

schemaName - the name of the schema that is displayed in the lookup window. Optional parameter. Default is BaseLookupPageTemplate

itemAttributeName - the name of the attribute from which the title is taken, the name of the entity schema and in which the result of the selection in the window will be written. Optional parameter. As a rule, this is the attribute with which the Combobox control is associated.

itemsAttributeName - the name of the attribute from which the data source name is taken. Optional parameter.

afterClosed - callback function returning the result of the selection in the window. Optional parameter.

filtersConfig- describes the filter to be applied to the data. Optional parameter

P.S. Additionally, users can enable features and much more, which you're able to read from the article on the Academy in the near future.

 

Anhelina,

Thanks for this Anhelina. 

Anhelina, 

Hi!

How i can filter SelectionWindow by using value from lookup field on page? 

 

I try this: 

{
   request: "usr.AddSection",
   handler: async (request, next) => {
 
       const id = request.$context.PDS_Transport2_93i8xm8;
 
 
       request.$context.executeRequest({
           type: "crt.OpenLookupPageRequest",
           $context: request.$context,
           entitySchemaName: "Section",
           features: {
               select: {
                   multiple: true,
                   selectAll: false,
                   resultType: 'lookupValues'
               },
               create: {
                   enabled: false
               }
           },
           filtersConfig: {
               filterAttributes: [
                   {
                       name: 'MyFilter',
                       loadOnChange: false
                   }
               ],
               attributesConfig: {
                   MyFilter: {
                       value: {
                           "items": {
                               "29e16d42-36f1-4e04-9029-4321cbb2494d": {
                                   "filterType": 1,
                                   "comparisonType": 11,
                                   "isEnabled": true,
                                   "trimDateTimeParameterToDate": false,
                                   "leftExpression": {
                                       "expressionType": 0,
                                       "columnPath": "Transport"
                                   },
                                   "isAggregative": false,
                                   "dataValueType": 1,
                                   "rightExpression": {
                                       "expressionType": 2,
                                       "parameter": {
                                           "dataValueType": 1,
                                           "value": id.value
                                       }
                                   }
                               }
                           },
                           "logicalOperation": 0,
                           "isEnabled": true,
                           "filterType": 6,
                           "rootSchemaName": "Section"
                       }
                   }
               }
           },
           afterClosed: function(selectedItems) {
               const textValues = Object.values(selectedItems).map(item => item.displayValue).join(', ');
               request.$context.PDS_SectionUpload_h11bk0p = textValues;
           }
       });
   }
}

but always get error: The data types nvarchar and uniqueidentifier are incompatible in the add operator.

Ryan Farley,

Maybe you can help?

 

Grygorii Synieok,

You forgot to await the value when getting the attribute. 

Change to this (note the added "await"): 

const id = await request.$context.PDS_Transport2_93i8xm8;

Ryan

Ryan Farley,

Thank you!

But another problem was with: "dataValueType":10 and  "comparisonType":3 with this parametrs works fine.

Full code:

{
    request: "usr.AddSection",
    handler: async (request, next) => {
 
        var autoId = await request.$context.PDS_UsrTransport2;
 
 
        request.$context.executeRequest({
            type: "crt.OpenLookupPageRequest",
            $context: request.$context,
            entitySchemaName: "SectionAuto",
            features: {
                select: {
                    multiple: true,
                    selectAll: false,
                    resultType: 'lookupValues'
                },
                create: {
                    enabled: false
                }
            },
            filtersConfig: {
                filterAttributes: [
                    {
                        name: 'MyFilter',
                        loadOnChange: false
                    }
                ],
                attributesConfig: {
                    MyFilter: {
                        value: {
                            "items": {
                                "29e16d42-36f1-4e04-9029-4321cbb2494d": {
                                    "filterType": 1,
                                    "comparisonType":3,
                                    "isEnabled": true,
                                    "trimDateTimeParameterToDate": false,
                                    "leftExpression": {
                                        "expressionType": 0,
                                        "columnPath": "Transport"
                                    },
                                    "isAggregative": false,
                                    //"dataValueType": 1,
                                    "rightExpression": {
                                        "expressionType": 2,
                                        "parameter": {
                                            "dataValueType": 10,
                                            "value":autoId.value
                                        }
                                    }
                                }
                            },
                            "logicalOperation": 0,
                            "isEnabled": true,
                            "filterType": 6,
                            "rootSchemaName": "SectionAuto"
                        }
                    }
                }
            },
            afterClosed: function(selectedItems) {
                const textValues = Object.values(selectedItems).map(item => item.displayValue).join(', ');
                request.$context.PDS_UsrSection = textValues;
            }
        });
    }
}

Hello Harvey,

 

I've a 8.1.3 environment and on some pages the crt.OpenLookupPageRequest works correctly  while on other pages it doesn't open the required lookup

Do you have the same issue ?

 

 

 

 

 

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

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