businessrules
urgent
Highpriority
Sales_Creatio_enterprise_edition
8.0

Hi there,

 

I am creating a business rule to auto-populates the field with the current user contact for custom field Owner, but I am not able to find out what should be the action for this and also not able to see the current user option. Please see the screenshot below

Like 0

Like

1 comments

Not possible with rules on classic pages. Best option would be to set it as the default for that column in the object. Select the object and choose the Owner column and set Current User Contact for default value. 
Otherwise, you'd need to get current user and populate via code in the onEntityInitialized - make sure the page is in add mode.

Ryan

Show all comments
Creatio_7_16
ILanguageIterator
email templates
Sales_Creatio_enterprise_edition
7.16

I have created a signal-based Business Process that fires on modifying the data in Opportunity.

 

To Read the Email Template I write the following code:

using System;
	using System.Collections.Generic;
	using System.Linq;
	using Newtonsoft.Json;
	using Terrasoft.Common;
	using Terrasoft.Configuration;
	using Terrasoft.Configuration.Utils;
	using Terrasoft.Core;
	using Terrasoft.Core.Configuration;
	using Terrasoft.Core.DB;
	using Terrasoft.Core.Entities;
	using Terrasoft.Core.OperationLog;
	using SystemSettings = Terrasoft.Core.Configuration.SysSettings;

	
	public class EmailTemplateManager
	{

		private UserConnection _userConnection;
		private MacrosHelperService _macrosService;
		private readonly Dictionary _cachedTemplates = new Dictionary();

		public EmailTemplateManager(UserConnection userConnection) : base() {
			_userConnection = userConnection;
			MacrosHelperV2 macrosHelper = new GlobalMacrosHelper();
			macrosHelper.UserConnection = userConnection;
			_macrosService = new MacrosHelperService(macrosHelper, userConnection);
		}
		
		public string GetEmailTemplateSchemaName() {
			return _userConnection.GetFeatureState("EmailMessageMultiLanguage") == 0
				? "EmailTemplate"
				: "EmailTemplateLang";
		}
		
		public string GetTemplateBody(Guid recordId, Guid templateId) {
			var template = GetTemplate(templateId);
			if(template != null) {
				var schemaName = GetSchemaNameFromId(template.GetTypedColumnValue("ObjectId"));
				var body = this.GetTemplateBody(new MacrosHelperServiceRequest
				{
					EntityId = recordId,
					EntityName = schemaName,
					TemplateId = templateId
				});
				return body;
			}
			return string.Empty;
		}
		
		public string GetTemplateBody(MacrosHelperServiceRequest request) {
			MacrosHelperServiceResponse template = null;
			string body = string.Empty;
			if (_userConnection.GetIsFeatureEnabled("EmailMessageMultiLanguageV2")) {
				template = _macrosService.GetMultiLanguageTextTemplate(request);
				body = template.TextTemplate;
			} else {
				template = _macrosService.GetMultiLanguageTextTemplate(request);
				body = template.TextTemplate;
			}
			return body;
		}
		
		public string GetTemplateSubject(MacrosHelperServiceRequest request) {
			MacrosHelperServiceResponse template = _macrosService.GetMultiLanguageTextTemplate(request);
			string title = template.SubjectTemplate;
			return title;
		}

		private bool IsNeedChangeMacrosCulture() {
			return _userConnection.GetIsFeatureEnabled("UseMacrosAdditionalParameters")
				&& _userConnection.GetIsFeatureEnabled("EmailMessageMultiLanguageV2");
		}
		
		public string GetTemplateSubject(Guid recordId, Guid templateId) {
			var template = GetTemplate(templateId);
			if(template != null) {
				var schemaName = GetSchemaNameFromId(template.GetTypedColumnValue("ObjectId"));
				return GetTemplateSubject(new MacrosHelperServiceRequest
				{
					EntityId = recordId,
					EntityName = schemaName,
					TemplateId = templateId
				});
			}
			return string.Empty;
		}

		private string GetSchemaNameFromId(Guid objectId) {
			if(objectId != Guid.Empty) {
				var selectQuery  = new Select(_userConnection)
								.Column("Name")
								.From("SysSchema")
								.Where("UId")
									.IsEqual(Column.Parameter(objectId)) as Select;
									
				return selectQuery.ExecuteScalar();
			}
			return string.Empty;
		}
		
		public Entity GetTemplate(Guid id) {
			Entity template;
			if (_cachedTemplates.ContainsKey(id)) {
				template = _cachedTemplates[id];
			} else {
				var esq = new EntitySchemaQuery(_userConnection.EntitySchemaManager, GetEmailTemplateSchemaName());
				esq.AddColumn("Object");
				esq.AddColumn("Subject");
				esq.AddColumn("Body");
				esq.Filters.Add(esq.CreateFilterWithParameters(FilterComparisonType.Equal, "Id", id));
				template = esq.GetEntity(_userConnection, id);
				_cachedTemplates.Add(id, template);
			}
			return template;
		}	
	}

 

To call this class in the Business Process I used this code:

try{
	
	var userConnection = GetUserConnection();
	var emailManager = new EmailTemplateManager(userConnection);
	var templateId = Get("TemplateId");
	var recordId = Get("RecordId");
	var subject = emailManager.GetTemplateSubject(recordId, templateId);
	var body = emailManager.GetTemplateBody(recordId, templateId);
	Set("Body", body);
	Set("Subject", subject);
}
catch(Exception ex){
	Set("Subject", ex.Message);
	Set("Body", ex.StackTrace);
}
return true;

 

 

To get the UserConnection in the background I used this Code:

private UserConnection GetUserConnection(){
	return Get("UserConnection");
}

 

Here is the error I get:

Error Message: Error creating an instance of the "Terrasoft.Configuration.ILanguageIterator" class 

Stack Trace:   at Terrasoft.Core.Factories.ClassFactory.GetInstance[T](Func`1 action)
  at Terrasoft.Configuration.MLangContentFactory.GetContentKit(String iteratorTagName, String storeTagName)
  at QTECX.Email.EmailTemplateManager.GetTemplateSubject(String schemaName, Guid recordId, Guid tplId)
  at QTECX.Email.EmailTemplateManager.GetTemplateSubject(Guid recordId, Guid templateId)
  at Terrasoft.Core.Process.QTXTestEmailProcessMethodsWrapper.ScriptTask1Execute(ProcessExecutingContext context)

 

 

Like 0

Like

6 comments

I created the very same business process and manually specified RecordId (Id is a random Opportunity record) as 

 

new Guid("6344D6CE-F889-4361-83F2-9CD71DBD6300")

 

and TemplateId (Id is a random email template) as

 

new Guid("8F5C1959-25E0-45BC-A62D-04B516502A82")

 

in the process parameters and didn't get the error you received (checked the application logs dicrectly, BusinessProcess.log, Common.log and the Error.log files). Both the EmailTemplateManager class and the business process were created in the Custom package.

 

So the assumption is that either both the business process and the class on your end are created in an assembly package (or in separate packages, one of which is an assembly package) or the issue is in the parameters that the business process receives. Tested everything in the full bundle 8.1.4 application.

But we have to use this code in the Creatio 7.16 Version and it returns this error.

Syed Ali Hassan Shah,

You can order a trial site of 8.1.4 and check the suggested solution. If it works, please update the application to the newest version.

Anhelina,

We can not update the site to the latest version there are many complications in it Creatio Team already tried it once but didn't work out. Can you please suggest a solution for Version 7.16

Is there any update on the solution for Version 7.16?

Any update on this?

Show all comments
VersionControl
Git
Sales_Creatio_enterprise_edition
8.0

Hi, does anyone have information on how best to carry out branching development in Creatio using Git? We've found plenty of pitfalls and issues with doing so that we work around in various ways, but it doesn't feel particularly streamlined and has plenty of trial and error involved, which isn't ideal!

 

Some of the things we encounter are desynchronisation of the database with the config, various errors thrown by the compiler, quite a consumption in time of switching branches, it being a bit easy to lose config changes unless you are very precise about how you change branches etc.

Like 1

Like

3 comments

Hello Harvey,

Based on our experience, most problems occur when switching branches that have different objects (for example, an object exists in one branch but not in another). This issue is not exclusive to Creatio but is common to all projects that use an ORM (Object-Relational Mapping) system to manage the database, such as EntityFramework. Therefore, the advice here is to avoid switching between such branches. If you must do so, remember to remove reverse references between objects (which are created for OData). I do this by executing the following queries in the database:

```sql
DELETE FROM SysSchemaSource WHERE SysSchemaId IN (SELECT Id FROM SysSchema WHERE SysPackageId NOT IN (SELECT Id FROM SysPackage));
DELETE FROM SysSchema WHERE SysPackageId NOT IN (SELECT Id FROM SysPackage);
DELETE FROM SysPackageSchemaData WHERE SysPackageId NOT IN (SELECT Id FROM SysPackage);
DELETE FROM SysSchemaSource WHERE Name LIKE '%backreference%';
```

After that, I perform a compilation.

Additionally, frontend schemas also have connections through the configuration (for example, the `SysModuleEdit` table), and if the schemas are missing, you might end up with a non-working UI.

In different branches, schemas can also be moved between packages, and the relationships in the configuration can break because of this.

This is precisely why only SVN is officially supported, and using Git comes with limitations similar to those when using SVN.

You should also consider that Git only deletes files, but folders may remain empty. While this is not an issue for Git, it is very important for Creatio. All empty folders are perceived as packages, and if a folder is empty, it will be populated when exporting code to the file system.

Also, deleting a package through Git will not remove the package in the configuration because Creatio reacts only to code changes, and if there are none, no changes will occur.

Our team has a whole list of such nuances, but we have written PowerShell scripts to solve most of them (for example, deleting all empty folders or removing a SQL script that remains when renaming it through the configuration and a new one is created with a new name).

I can describe our other rules as well, but that would take more time.

 

P.S. The Creatio system is well-designed if you follow its development features and keep it clean (for example, developers often delete schemas without removing resources, or they move schemas between packages through the file system to save time instead of doing it through the configurator). If you establish rules, adhere to them, and use helper scripts, development won't cause unpleasant issues.

Dear Harvey,

Unfortunately, there is no universal recommendation that could completely resolve your issue. However, here are a few key points to consider:
 

    1) All packages in the configuration should be tied to a single Git repository, since they depend on each other and need to be saved as part of a single commit. (It's not recommended to store each package in a separate repository.)


    2) Automatically generated folders in independent packages should be added to the .gitignore file.


    3) The obj folders in independent packages should also be added to the .gitignore.


    4) Only your custom packages should be added to the repository. For vendor packages (from Creatio) and Marketplace packages, use the standard methods (application installation, upgrading to a new version).


    5) Never modify vendor packages (from Creatio). To extend functionality, use inheritance and entity substitution.


    6) Schema metadata is difficult to merge and understand, so it is recommended that only one developer works on extending objects or modifying a specific schema.

    7) If a developer makes changes in one environment and commits them to the repository, and others pull these changes, there should be no database and configuration desynchronization issues.

    8) You can create scripts to quickly set up the environment and pull the necessary branch from the repository. This will help avoid issues with leftover data from a different branch.

Thank you!

Thanks both, we currently have the below for our project's gitignore - does this seem reasonable to you both? Anything that could be added/should be removed?

 

# Custom

#Exclude all files and folders
*/*

#Include custom packages
!UsrProject1/**
!UsrProject2/**
!.gitignore

#Include source files
!Src/ThirdPartyPackages
!Src/sql_scripts

#Ignore temporary build files
Directory.Build.props

#Not sure if you need these
Autogenerated/Src


#Ignore temporary folders
bin/
debug/
obj/
release/
packages/
TestResults/
node_modules/
.scannerwork/
.sonarqube/
.vs/
.vscode/
.idea/

#Ignore Terrasoft solution
/Terrasoft.*

#Ignore thumbnails created by Windows
Thumbs.db

#Ignore files built by Visual Studio
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
**/*.cache
*.ilk
*.log
*.lib
*.sbr
package-lock.json
launchSettings.json

Show all comments
file upload
Files
S3
Sales_Creatio_enterprise_edition
8.0

Good day.

 

Creatio has S3 integration, so there must be a S3 client inside. 

Where i can find it? Or any other possibilities to put file inside the current file storage.

 

In documentation i find example of storage implementation, witch i dont need because it is already contains S3 file storage integration.

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/back-end-development/api-for-file-management/examples/implement-a-file-content-storage

 

And a file data saved directly in database. This case is irrelevant too because im interested to put data in current storage (SysSetting ActiveFileContentStorage), not in database.

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…

 

Appreciate any help. Thanks.

Like 0

Like

1 comments

Hello,
 

Uploading or accessing existing files should be done through the API for file management. 
We encourage you to read the documentation on the API for file management on Creatio Academy.
Also, in the documentation there is an example for creating new files using the Terrasoft.File.Abstractions.IFileFactory interface.

 

IFileFactory
 

Thank you.

Show all comments
lookup
detail
record
Sales_Creatio_enterprise_edition
8.0

Hi. Is it possible to make the lookup fields of a record clickable in an editable detail?

Like 0

Like

3 comments

Hello,

In order to make the lookup fields of a record clickable, you need to set the Lookup view type to "Selection window." When the Lookup view type is set to "List," the records are not clickable.

image.png

Best regards,
Antonii.

Antonii Viazovskyi,

Hello. What's most interesting is that the value of this field is selected in the Window. And it's still not clickable. Maybe there's an option to hardcode this into the detail code?

Hello,
Take a look at this discussion, I believe there you can find an answer on how to do it.

https://community.creatio.com/questions/lookup-be-displayed-link-inside…

Show all comments
Sales_Creatio_enterprise_edition
8.0

Hello Guys , I am having this problem and I have no idea from where it is happening . 

Any idea please ?

Like 0

Like

1 comments

Hello!

 

It appears that you're trying to create a field with a code that already exists in the object. 

I recommend reviewing all the fields you plan to create to ensure that each one has a unique code within the object.

 

Best regards,

Kate

Show all comments
case
Email
signature
Sales_Creatio_enterprise_edition
8.0

Hi Community,

 

We have this requirement, where we need to have multiple signatures per outbound email. And selected them based on the case category lookup.

 

So for example:

 

Case 1 > Category A > Signature A

 

Case 2 > Category B > Signature B

 

But for the same outbound email.

 

https://academy.creatio.com/docs/8.x/no-code-customization/base-integrations/mailbox-setup/email-account-individual-settings#title-1953-3

 

We would like to know what is the best way to achieve such functionality? What schemas should we change?

 

Thank you.

 

Best Regards,

Pedro Pinheiro

Like 1

Like

1 comments

Hello,

 

Please note that there's no functionality to set up such logic in the system at the moment. However, we have registered this idea for our R&D team and they will review the possibility of adding it in future releases.

 

As a workaround, you could remove the personal signatures of the users and instead create the email templates and design the needed signature as part of the template itself. You can also set up automatic filling in of the sender's name with the help of a macro.

Show all comments
permissions
Object Permissions
edit
delete
feedsection
Sales_Creatio_enterprise_edition
8.0

Hello,

I would like to ask how to enable additional options such as editing or deleting notes in this section.

Currently, I can delete and edit them, but only from the message card; however, I am unable to edit directly on the object. It is important to me that the person who adds a note can independently edit it directly on the opportunity,

Best Regards 

 

 

Like 0

Like

3 comments

Hello

 

You should be able to delete records from the feed either on the feed page itself or from the communication panel, but only your own records. You cannot edit or delete other people's notes.


Dymytriy Vykhodets,

I understand, in that case how can you turn on the ability to edit own records 

Michał Zieliński,

 

Hello,

 

This option should be enabled by default. We would need to get access to your environment in order to investigate this issue. Please write to support@creatio.com and we will assist you with the request.

Show all comments
login
Sales_Creatio_enterprise_edition
8.0

I'm encountering a recurring issue with logging into Creatio, which happens almost every day. After entering my login credentials, the system often gets stuck on the loading screen with the Creatio logo. This issue usually occurs during the first login of the day, but it has also happened during subsequent login attempts.

I've identified that the loading process halts at the following script:

https:///api/ClientScript/GenerateViewModuleScripts?v=8.1.0.6828
	

The time it takes to resolve this issue varies—sometimes it takes 2-10 minutes, but there have been instances where the screen remains stuck even after an hour. Importantly, there are no errors in the console during this time.This problem is significantly disrupting my ability to work with the system.

Has anyone else experienced this issue? Any suggestions or solutions would be greatly appreciated!

Like 0

Like

1 comments

Hello,

Please contact the Support team for analyzing this issue. The email address: support@creatio.com.

Show all comments
Zapier
identity_service
AutoLogin
Sales_Creatio_enterprise_edition
8.0

Hello,

we have succesfully configured identity service and some processess integrating Creatio and other apps through Zapier. The problem is, the integration works in 30-50% of zap runs. In other cases we encounter error like this below:

What we concluded is that Zapier connector connects to our Creatio URL https://creatio.astor.com.pl, where it is redirected to login page and this is somehow the case. W changed the default timeout of login session to unlimited and it didn't changed anything.

 

We asked Creatio support about that and heard that "this connector is not supported by Creatio team so ask DevLabs" but DevLabs says on its Creatio Partner website that I should write a post here, in community. So now I do :) Please help us solve this puzzle, because without Zapier connector we are pushed to reconsider our next moves about Creatio development.

Like 1

Like

1 comments

The Zapier connector for Creatio is somewhat limited and does have some problems. Another option, plus much more reliable route (in my opinion) is to simply use Creatio webhooks. See https://academy.creatio.com/docs/8.x/no-code-customization/base-integrations/webhook-service-integration/overview

Zapier can easily send webhooks to Creatio, plus the use of webhooks is much more flexible and allows for a greater set of objects and fields to be used since the Zapier connector is limited to just a couple of objects (last I checked). 

Since your system looks like it's self-hosted based on the URL, assume you might need to contact support for getting webhooks setup for use.

Ryan

Show all comments