Hi Community,

 

We have this functionality that we are subscribing to message on load of record page. How we can unsubscribe once we close/cancel/discard the record page.



Below is the code how we subscribe during record on load.



    init: function() {

                this.callParent(arguments);

                this.subscriptionFunction();

                

            },

            

            subscriptionFunction: function() {

                Terrasoft.ServerChannel.on(Terrasoft.EventName.ON_MESSAGE,

                this.onMyProcessMessage, this);

            },

Like 0

Like

2 comments

To unsubscribe from the message when the page is closed/canceled/etc, add the following: 

destroy: function() {
    Terrasoft.ServerChannel.un(Terrasoft.EventName.ON_MESSAGE, this.onMyProcessMessage, this);
    this.callParent(arguments);
}

Ryan

Ryan Farley,

Thank you Ryan.

Show all comments

When open edit card, functional(visual and js) doesn't working and in console next error's:



 file: https://dogarray.com/core/hash/ng-core/src/polyfills-es5.js?hash=41f4be…

 line: 1

 column: 16702

 message: Uncaught Terrasoft.ItemNotFoundException: Property Ext is not defined in class Terrasoft.model.BaseViewModel 




*Helping out re-create edit page, but I don't like this way

Like 0

Like

1 comments

Hello,



Could you please specify how did you create this section\edit page?

 

Show all comments
Question

Hello, im trying to migrate a package to a new project, but i cant upload my files since the configuration is not available and I have not found a way to activate it.



I had tried to use the tutorial in creatio academy but is still confuse for me. 



Like 0

Like

1 comments

Hi Community,

 

We have two email address configured to create record in case via the out of the box functionality "register case from incoming emails". As per the OOB structure how we will identify the source email address of the created case record, as both of the emails are configured under supervisor.

 

  

Like 0

Like

1 comments

I assume what you're after is the mailbox that received the email that the case was created from. Correct? You can determine the mailbox that the case was created from by doing the following:

  1. Read Case to get "Parent activity" column. This is the email that created the case.
  2. Read from "Email message" where Activity = Parent Activity from the Case. This will give you the MailboxSyncSettings that the email is from as one of the columns. The MailboxSyncSettings record is the email account that received the email.
  3. Read the MailboxSyncSettings record returned from #2 to get the details about the mailbox that the email was received from.

Ryan

Show all comments

Hi, everybody!

 

Given:

There is a detail with an editable grid

It is necessary to apply some filter to the records of the part reference field, but only if there are no records in another part (OrderProduct object) (for a specific Order)

Solution attempt:

An attribute with lookup List Config has been added to the details page:

<br />
      "PrbProduct": {<br />
        "dataValueType": Terrasoft.DataValueType.LOOKUP,<br />
        "lookupListConfig": {<br />
          "filters": [<br />
            function() {<br />
              var subFilterGroup = this.Terrasoft.createFilterGroup();<br />
              subFilterGroup.addItem(this.Terrasoft.createColumnFilterWithParameter(this.Terrasoft.ComparisonType.EQUAL, "Order", this.$PrbOrder.value));<br />
              var filterGroup = this.Terrasoft.createFilterGroup();<br />
              filterGroup.logicalOperation = this.Terrasoft.LogicalOperatorType.OR;<br />
              filterGroup.addItem(this.Terrasoft.createNotExistsFilter("[OrderProduct].Id", subFilterGroup));<br />
              filterGroup.addItem(this.Terrasoft.createColumnFilterWithParameter("PrbOrder", this.$PrbOrder.value));<br />
              return filterGroup;<br />
            }<br />
          ]<br />
        }<br />
      },<br />

 

Problem:

It is not possible to find the correct path to the column in create Not Exists Filter. Or there is an error like "Column on the path [Order Product].Id was not found in the "Product" schema, or (with some other values) the filter does not work as needed.

Tell me, please, is it even possible to create Not Exists Filter/createExistsFilter without binding to the detail object?

How to correctly specify the "path to the column" in this case?

Like 0

Like

4 comments
Best reply

Fariz Mamedov,

 

Just open the console in browser (F12 in Chrome) and go to the "Network" tab. And then find the correspondent SelectQuery request and review its body:

Hello Fariz,

 

The task is to create a filter starting from the object of the lookup column for which we are creating the lookupListConfig. The easiest way to properly build path to the needed column is creating the same filter, but using advanced filters in the section. This will result in the SelectQuery request where filters can be reviewed and the content of the filter copied which will show you an accurate path to the column needed.

Oleg Drobina,

Thank you! Interesting trick.

Please, provide details about: "This will result in the SelectQuery request where filters can be reviewed" - how exactly I can review such a request? 

Fariz Mamedov,

 

Just open the console in browser (F12 in Chrome) and go to the "Network" tab. And then find the correspondent SelectQuery request and review its body:

Oleg Drobina, Super thx!

Show all comments

Hello,

 

I am trying to add a new record in a detail inside to another one. The + button is missing even the object permission are configured for this role. (attach Creatio1.png)

 

When I change the detail with option "Make the list editable"  (attach Creatio2.png), the button is shown but the business rules and filters are not applied.  (attach Creatio3.png)

 

Any idea how to fix this issue?

Like 0

Like

4 comments
Best reply

Hello Denisa,

 

I would be happy to provide you with additional information regarding the database connections for the detail in question.

The detail must be connected to the SysModuleEntity record, which was added to the portal (SysModuleEntityInPortal table) to display for portal users.

Also, the detail must be connected to the SysModuleEntity record with no connection to the portal setting (SysModuleEntityInPortal table) to display for system users.



You have to create separate records  for details in the SysModuleEntity table:



1. The required connections for system users:

SysModuleEntity (Id column) - SysModuleEdit (SysModuleEntityId column).

2. The required connections for portal users :

SysModuleEntityInPortal (SysModuleEntityId column) - SysModuleEntity (Id column) - SysModuleEdit (SysModuleEntityId column).

 

By confirming the presence of these connections, you can ensure that the detail is properly configured to be displayed for both system users and portal users.

 

Best regards,

Kate

Hello!

 

It seems that you use the same detail for the main and portal page. To resolve the current issue, we recommend creating a separate detail for the portal page.

Here are the steps you can follow:

1) Go to the portal master wizard for your section.

2) Remove the existing detail from the portal edit page.

3) Create and add a new detail specifically designed for portal users in the detail section wizard, based on the existing object.

4) Add the new detail to the portal page.

5) Make sure to save the changes.

 

By creating a separate detail for the portal page, you can ensure that the issue you are experiencing is addressed and the users have the appropriate functionality.

 

Best regards,

Kate

Kate Karpik,

Hello Kate,

 

Thank you for your response. Your steps seems to be ok if the detail is related with section, because you have the possibility to have two section pages for full and portal and then relate full/portal detail schema in each page.

 

The issue I'm facing is with detail inside the detail. The system create only one page for the parent detail and if you have another detail inside the first one, even if you create two different details, the page of the parent detail is only one so the cardschema is the same for both full/portal of the child detail and the parent detail page is related only with one of them

Hello Denisa,

 

I would be happy to provide you with additional information regarding the database connections for the detail in question.

The detail must be connected to the SysModuleEntity record, which was added to the portal (SysModuleEntityInPortal table) to display for portal users.

Also, the detail must be connected to the SysModuleEntity record with no connection to the portal setting (SysModuleEntityInPortal table) to display for system users.



You have to create separate records  for details in the SysModuleEntity table:



1. The required connections for system users:

SysModuleEntity (Id column) - SysModuleEdit (SysModuleEntityId column).

2. The required connections for portal users :

SysModuleEntityInPortal (SysModuleEntityId column) - SysModuleEntity (Id column) - SysModuleEdit (SysModuleEntityId column).

 

By confirming the presence of these connections, you can ensure that the detail is properly configured to be displayed for both system users and portal users.

 

Best regards,

Kate

Kate Karpik,

 

Thanks for the detailed explanation, it worked out:)

 

The code in case that someone has the same issue:

-- 1. (Manual input) Change caption: with the caption of the new entity related with new detail
-- In my case the new object, the page and both details (full/portal) begin with ne same contain same caption. 
DECLARE @Caption as varchar(200) = 'Loan proposed terms and condition'
 
--2. (Manual input) Change Name: with the Name of the Parent Page of new detail 
DECLARE @CardSchemaUId uniqueidentifier = (
	SELECT	UId 
	FROM	SysSchema 
	WHERE	Name='FZSchema584f510ePage' 
)
-- 3. (Automatic) Get Uid of entityschema related to new detail
DECLARE @SysEntitySchemaUId uniqueidentifier = ( 
	SELECT	TOP 1 UId 
	FROM	dbo.SysSchema 
	WHERE	Caption like '%' + @Caption +'%' and ManagerName = 'EntitySchemaManager' 
)
 
-- 4. (Automatic) Insert if not exist on SysModuleEntityInPortal
INSERT INTO [dbo].[SysModuleEntityInPortal] ([Id], [CreatedOn], [CreatedById], [ModifiedOn], [ModifiedById], [ProcessListeners], [SysPortalId], [SysModuleEntityId])
SELECT	[Id] = NEWID(), [CreatedOn] = getDate(), [CreatedById]=CreatedById, [ModifiedOn] = getDate(), [ModifiedById]= CreatedById, [ProcessListeners]=0, 
		[SysPortalId] = 'C8565240-1DA3-4A68-BD4E-280F17B0D32E', [SysModuleEntityId] = SysModuleEntity.Id
FROM	(
			SELECT	id, [CreatedById], SysEntitySchemaUId
			FROM	dbo.SysModuleEntity
			WHERE	SysEntitySchemaUId = @SysEntitySchemaUId
		) SysModuleEntity		
		OUTER APPLY (
			SELECT	count (1) AS NR
			FROM	dbo.SysModuleEntityInPortal scp
					INNER JOIN dbo.SysModuleEntity sm ON scp.SysModuleEntityId = sm.Id
			WHERE	sm.SysEntitySchemaUId = @SysEntitySchemaUId
		) InSysPortal
WHERE	InSysPortal.NR IS NULL OR InSysPortal.NR = 0
 
-- 5. (Automatic) Insert if not exist on SysDetail
INSERT INTO [dbo].[SysDetail] ([Id], [CreatedOn], [CreatedById], [ModifiedOn], [ModifiedById], [ProcessListeners], [Caption], [DetailSchemaUId], [EntitySchemaUId])
SELECT	[Id] = NEWID(), [CreatedOn]= getDate(), [CreatedById], [ModifiedOn]= getDate(), [ModifiedById], [ProcessListeners], 
		[Caption] = SysSchema.Caption, [DetailSchemaUId] = SysSchema.Uid, [EntitySchemaUId] = @SysEntitySchemaUId
FROM	dbo.SysSchema 
WHERE	Caption like '%' + @Caption +'%' AND [Name] like '%Detail' AND ManagerName ='ClientUnitSchemaManager'
		AND Uid not in (Select [DetailSchemaUId] from SysDetail)
 
-- 6. (Automatic) Insert if not exist on SspPageDetail
INSERT INTO [dbo].[SspPageDetail] ([Id], [CreatedOn], [CreatedById], [ModifiedOn], [ModifiedById], [ProcessListeners], [CardSchemaUId], [EntitySchemaUId], [SysDetailId])
Select	[Id] = NEWID(), [CreatedOn]= getDate(), [CreatedById], [ModifiedOn]= getDate(), [ModifiedById], [ProcessListeners], 
		[CardSchemaUId] = @CardSchemaUId, [EntitySchemaUId] = SysDetail.EntitySchemaUId, [SysDetailId] = SysDetail.Id
FROM	SysDetail 
WHERE	EntitySchemaUId=@SysEntitySchemaUId and Caption like '%portal%'
		and Id not in ( Select SysDetailId FROM SspPageDetail )
 
-- 7. (Automatic) Insert if not exist on SysModuleEntity
INSERT INTO [dbo].[SysModuleEntity] ([Id], [CreatedOn], [CreatedById], [ModifiedOn], [ModifiedById], [TypeColumnUId], [ProcessListeners], [SysEntitySchemaUId])
SELECT	[Id] = NEWID(), [CreatedOn]= getDate(), [CreatedById], [ModifiedOn]= getDate(), [ModifiedById], [TypeColumnUId], [ProcessListeners], [SysEntitySchemaUId]
FROM	dbo.SysModuleEntity
WHERE	SysEntitySchemaUId = @SysEntitySchemaUId AND 
		(
			SELECT	count (1) 
			FROM	dbo.SysModuleEntity
			WHERE	SysEntitySchemaUId = @SysEntitySchemaUId
		) &lt; 2
 
-- 8. (Automatic) Insert if not exist on SysModuleEdit also the new recored that was insertet on previos step
INSERT INTO [dbo].[SysModuleEdit] ([Id], [CreatedOn], [CreatedById], [ModifiedOn], [ModifiedById], [SysModuleEntityId], [TypeColumnValue], [UseModuleDetails], [Position], [HelpContextId], [ProcessListeners], [SysPageSchemaUId], [CardSchemaUId], [ActionKindCaption], [ActionKindName], [PageCaption], [MiniPageSchemaUId], [SearchRowSchemaUId], [MiniPageModes])
SELECT	TOP 1 [Id] = NEWID(), [CreatedOn] = getDate(), [CreatedById], [ModifiedOn] = getDate(), [ModifiedById], 
		[SysModuleEntityId] = new.SysModuleEntityId, [TypeColumnValue], [UseModuleDetails], [Position], [HelpContextId], [ProcessListeners]=0, [SysPageSchemaUId], [CardSchemaUId], [ActionKindCaption], [ActionKindName], [PageCaption], [MiniPageSchemaUId], [SearchRowSchemaUId], [MiniPageModes]
FROM	SysModuleEdit ref
		CROSS JOIN (
			SELECT	s.id as SysModuleEntityId
			FROM	SysModuleEntity s
					LEFT JOIN SysModuleEdit t On t.SysModuleEntityId = s.Id 
			WHERE	SysEntitySchemaUId = @SysEntitySchemaUId AND t.id IS NULL
		) new 
WHERE	ref.SysModuleEntityId in (
			SELECT	id
			FROM	dbo.SysModuleEntity
			WHERE	SysEntitySchemaUId = @SysEntitySchemaUId
		)

 

Show all comments

I am creating a new record:

var schema = UserConnection.EntitySchemaManager.GetInstanceByName("UsrTable");
var entity = schema.CreateEntity(UserConnection);
entity.SetDefColumnValues();
entity.SetColumnValue("UsrColumn", columnValue);
entity.Save();
var recordId = entity.GetColumnValue("Id");

and then creating a linked record in a related table:

var schema2 = UserConnection.EntitySchemaManager.GetInstanceByName("UsrRelatedTable");
var entity2 = schema2.CreateEntity(UserConnection);
entity2.SetDefColumnValues();
entity2.SetColumnValue("UsrTable", recordId);
entity2.Save();

I'm getting the following error referring to the `UsrTable` lookup column in `UsrRelatedTable` table when running the process:

Terrasoft.Common.ItemNotFoundException: Value "UsrTable" was not found.
   at Terrasoft.Core.Entities.EntityColumnValueCollection.GetByName(String name)
   at Terrasoft.Core.Entities.Entity.SetColumnValue(String valueName, Object value)
   at Terrasoft.Core.Process.UsrImportCustomersSubMethodsWrapper.DeserialiseJSONExecute(ProcessExecutingContext context)
   at Terrasoft.Core.Process.ProcessScriptTask.InternalExecute(ProcessExecutingContext context)
   at Terrasoft.Core.Process.ProcessFlowElement.ExecuteItem(ProcessExecutingContext context)
   at Terrasoft.Core.Process.ProcessFlowElement.Execute(ProcessExecutingContext context)

The question is essentially how to initialise a lookup column with a record Id.

Like 0

Like

2 comments

It seems that the issue is in the column name:

 

  at Terrasoft.Core.Entities.EntityColumnValueCollection.GetByName(String name)
   at Terrasoft.Core.Entities.Entity.SetColumnValue(String valueName, Object value)

 

Please try UsrTableId column name

 

entity2.SetColumnValue("UsrTableId", recordId);

since this should be a lookup column for which the value is set.

Oleg Drobina,

Thank you Oleg, I should have figured that one out myself.  Cheers,

Show all comments
Question

I need to create a lookup filter for the following SQL

DECLARE @P1 uniqueidentifier = 'D21F0468-F86B-4707-9FDB-C093CF0F6F87';
 
SELECT UsrProductList.Name
FROM UsrProductList
WHERE EXISTS (
	SELECT UsrProductLineOfBusiness.UsrProduct
	FROM UsrProductLineOfBusiness
	WHERE UsrProductLineOfBusiness.UsrProductId = UsrProductList.Id
	AND UsrProductLineOfBusiness.UsrLineOfBusinessId = @P1
)

Following this post I got as far as

"UsrProduct": {
	"dataValueType": Terrasoft.DataValueType.LOOKUP,
	"lookupListConfig": {
		"filter": function() {
			var opportunityLobId = this.get("Opportunity.UsrOpportunityLineOfBusiness").value;
			var filterGroup= this.Ext.create("Terrasoft.FilterGroup");
			var subFilter = Terrasoft.createFilterGroup(Terrasoft.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, *** GROUND TO A HALT HERE *** , opportunityLobId));
			subFilter.addItem();
			filterGroup.add(Terrasoft.createExistsFilter([UsrProductLineOfBusiness:UsrProduct].id, subFilter));
			return filterGroup;
		}
	}
}

However ground to a halt at `UsrProductLineOfBusiness.UsrProductId = UsrProductList.Id` in the subquery.  If anyone has any clues they would be appreciated!

Like 0

Like

1 comments

For anyone who may happen this way in the future, this was solved with

"UsrProduct": {
	"dataValueType": Terrasoft.DataValueType.LOOKUP,
	"lookupListConfig": {
		"filter": function() {
			var opportunityLobId = this.get("UsrOpportunity.UsrOpportunityLineOfBusiness").value;
			var filterGroup = this.Ext.create("Terrasoft.FilterGroup");
			var subFilter = Terrasoft.createFilterGroup();
			subFilter.addItem(Terrasoft.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "UsrLineOfBusiness.Id", opportunityLobId));
			filterGroup.add(Terrasoft.createExistsFilter("[UsrProductLineOfBusiness:UsrProduct].Id", subFilter));
			return filterGroup;
		}
	}
}

The subfilter is applied to the table in the main query's column path.

Show all comments

Hi there!

I'm trying to run clio in Docker on Ubuntu Server 20.04.

Following instructions provided here - https://github.com/Advance-Technologies-Foundation/clio#installation-an…, I have downloaded the source code, and executed "docker build -f ./install/Dockerfile -t clio ."

But I got unexpected output, and, seems, clio container did not even started:



 

DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            Install the buildx component to build images with BuildKit:
            https://docs.docker.com/go/buildx/
 
Sending build context to Docker daemon  2.899MB
Step 1/13 : FROM mcr.microsoft.com/dotnet/sdk:3.1 as base
 ---> 1e8401d05dea
Step 2/13 : WORKDIR /app
 ---> Using cache
 ---> 18f52a48e0a5
Step 3/13 : FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build
 ---> 1e8401d05dea
Step 4/13 : WORKDIR /app
 ---> Using cache
 ---> 18f52a48e0a5
Step 5/13 : COPY clio clio
 ---> Using cache
 ---> fa0fb42a25ec
Step 6/13 : COPY clio.sln clio.sln
 ---> Using cache
 ---> d8527c9fcc93
Step 7/13 : WORKDIR /app/clio
 ---> Using cache
 ---> f4ae3f90ec62
Step 8/13 : RUN dotnet publish -c Release -o /app/published
 ---> Running in 432ba7ef38dd
Microsoft (R) Build Engine version 16.7.3+2f374e28e for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
 
  Determining projects to restore...
/app/clio/clio.csproj : error NU1202: Package DocumentFormat.OpenXmlSDK 2.0.0 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package DocumentFormat.OpenXmlSDK 2.0.0 supports: net35 (.NETFramework,Version=v3.5)
  Failed to restore /app/clio/clio.csproj (in 6.4 sec).
The command '/bin/sh -c dotnet publish -c Release -o /app/published' returned a non-zero code: 1

 

Like 1

Like

2 comments

Anybody, please, help!

Hi!

 

Based on the issue you are experiencing with running Clio Docker on Ubuntu 20.04, it seems to be related to compatibility or configuration problems. To address this, I would recommend following these steps:

  1. Make sure you have met the minimum system requirements for running Clio Docker on Ubuntu 20.04. Check the official documentation for any specific prerequisites.

  2. Double-check that you have correctly followed the installation steps outlined in the documentation or guide provided by Clio.

  3. If the issue persists, I suggest visiting the Clio GitHub repository for more information and possible solutions. You can access the repository at the following link: GitHub Repository. Please search for any existing issues that match your problem or consider opening a new issue to report your specific problem. GitHub representatives and the community can provide further assistance and guidance in troubleshooting the issue.

Remember to provide as much detail as possible when reporting the issue, including any error messages or logs you have encountered. This will help the GitHub community understand and address your problem more effectively.

 

I hope this helps.

Show all comments
Question

Is it possible to configure time based workflows - i.e., end dates and durations specified for workflow stages?

Like 1

Like

3 comments

One solution to this problem is to run a BPM process at a scheduled time each day to process the workflow.

Hello Gareth,

 

Could you please elaborate on your business task? 

Bogdan,

It's OK, thank you for the reply but the issue is solved now, cheers,

Show all comments