Время создания
Filters

Hello,

 

Does Creatio have any implemented logic for versioning the files? I see that the base File object has a "Version" column that is always set to 1, it seems. Can this behaviour be changed? 

 

Thank you!

Like 0

Like

0 comments
Show all comments

Hello!

 

In this article, we will describe how to work with macros and filling in the values.

 

This functionality was added specifically so that the user could clearly see that there are no values in these fields and that it is necessary to manually edit such an email before sending it.
 

To solve this issue, you can configure the mandatory filling of the fields used in the template for the template to be sent correctly.

Also, as part of sending emails through a process, you can add additional logic to the process itself by setting up two branches (containing and not containing data) using two email templates:
1) with macros
2) without macros
 

In general, to resolve the issue, make these fields mandatory when creating a record, or edit emails before sending them (in the process, check the “Send email manually” box for the [Send email] element), or reconfigure the process by creating two branches as described above.

 

Also, there is another way to resolve it.

 

In the business processes and bulk emails, macros are already empty when the data is not filled in. In the UI you would need to do the following to remove the macro description: 

You would need to create your own service, copying InvokableMacrosHelperService, change macrosHelper instantiation to use Factory: 

            var macrosHelper = new InvokableMacrosHelper { UserConnection = UserConnection };
to 
            var macrosHelper = ClassFactory.Get()
After that, you would need to override the ReplaceMacros(string template, List macrosInfo) method in class InvokableMacrosHelper (using [Terrasoft.Core.Factories.Override]) to change the macro to an empty value instead of a highlight instead:
 protected override string ReplaceMacros(string template, List macrosInfo) {
      string result = template;
      foreach (MacrosInfo item in macrosInfo) {
        string macrosDisplayValue = string.Format(MacrosTemplate, item.Alias);
        result = result.Replace(macrosDisplayValue, "");
      }
      return result;
    }

You can find an original method in MacrosHelperV2. After that, you would need to change the calls of the service from OOB service to your service in the action dashboard or email page. 

Like 0

Like

Share

0 comments
Show all comments
Question

Hi Team, somebody knows how to get the UId for an schema on a Freedom Page? I was using Terrasoft.EntitySchemaDesignerUtilities.getEntitySchemaUIdByName(EntityName) on classic, but seams not be working.

Like 0

Like

4 comments

Hello,

 

Can you please describe the approach that is not working a little bit more? Here is an example for the "Knowledge Base" section which is a Freedom UI section:

Also works properly for the custom section created in FreedomUI.

Oleg Drobina,

I'm trying to do it from a handler trigger from a button. For some reason is not getting there.

My version is 8.1.0.6672

 

Federico Buffa,

 

you can try another approach:

{
				request: "usr.CustomButtonClicked",
				handler: async (request, next) => {
					const sysSchemaModel = await sdk.Model.create("SysSchema");
					const filters = new sdk.FilterGroup();
					await filters.addSchemaColumnFilterWithParameter(sdk.ComparisonType.Equal, "Name", "Account");
					const result = await sysSchemaModel.load({
						attributes: ["Id", "UId", "Name"],
						parameters: [{
							type: sdk.ModelParameterType.Filter,
							value: filters
						}]
					});
					console.log(result);
				}
			}

Create an instance of the SysSchemaModel and load results based on the object name.

 

I couldn't locate the scenario for retrieving the UId of SysSchema directly, but you can try using this approach.

 

Or another option:

 

var currentSchemaUId = Terrasoft.configuration.ModuleStructure.Account.entitySchemaUId;

 

This will also return the UId of the SysSchema of the section entity (just replace Account with the needed object name).

Oleg Drobina,

Thank you Oleg. I think to do the query as well, but perhaps some class was available. I will try this approch.

Show all comments

Can anyone recommend the best filter to add to trigger an email send to our customers that reach a 3 year and 5 year anniversary of opening an account with us. I assumed it would look something like this, but I want to be sure. Thanks in advance.

Like 0

Like

0 comments
Show all comments

I am looking to filter an odata request within power automate to return only records where the modifiedon date is greater than a specified value. I have thus far tried the following without success:

 

$filter=ModifiedOn%20gt%20datetime'2023-05-23T00:00:00.0000000Z'

 

{ "error": { "code": "", "message": "The query specified in the URI is not valid. Unrecognized 'Edm.String' literal 'datetime'2023-05-23T00:00:00.0000000Z'' at '14' in 'ModifiedOn gt datetime'2023-05-23T00:00:00.0000000Z''.", "innererror": { "message": "Unrecognized 'Edm.String' literal 'datetime'2023-05-23T00:00:00.0000000Z'' at '14' in 'ModifiedOn gt datetime'2023-05-23T00:00:00.0000000Z''.", "type": "", "stacktrace": "" } } }

 

$filter=ModifiedOn%20gt%20cast('2023-05-23T00:00:00.0000000Z','Edm.DateTimeOffset')

 

{ "error": { "code": "", "message": "The query specified in the URI is not valid. The binary operator GreaterThan is not defined for the types 'System.Nullable`1[System.DateTime]' and 'System.Object'.", "innererror": { "message": "The binary operator GreaterThan is not defined for the types 'System.Nullable`1[System.DateTime]' and 'System.Object'.", "type": "", "stacktrace": "" } } }

 

$filter=ModifiedOn%20gt%20'2023-05-23T00:00:00.0000000Z'

 

{ "error": { "code": "", "message": "The query specified in the URI is not valid. A binary operator with incompatible types was detected. Found operand types 'Edm.DateTimeOffset' and 'Edm.String' for operator kind 'GreaterThan'.", "innererror": { "message": "A binary operator with incompatible types was detected. Found operand types 'Edm.DateTimeOffset' and 'Edm.String' for operator kind 'GreaterThan'.", "type": "", "stacktrace": "" } } }

 

$filter=ModifiedOn%20gt%20datetimeoffset'2023-05-23T00:00:00.0000000Z'

 

{ "error": { "code": "", "message": "The query specified in the URI is not valid. Unrecognized 'Edm.String' literal 'datetimeoffset'2023-05-23T00:00:00.0000000Z'' at '14' in 'ModifiedOn gt datetimeoffset'2023-05-23T00:00:00.0000000Z''.", "innererror": { "message": "Unrecognized 'Edm.String' literal 'datetimeoffset'2023-05-23T00:00:00.0000000Z'' at '14' in 'ModifiedOn gt datetimeoffset'2023-05-23T00:00:00.0000000Z''.", "type": "", "stacktrace": "" } } }

 

Any suggestions for how to achieve this would be much appreciated. Thanks.

Like 0

Like

1 comments

This works for me

$filter=ModifiedOn gt 2024-05-14T00:00:00Z

I don't know if there is something specific for power automate, but in just accessing the Creatio odata api this is valid.

Ryan

Show all comments