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

test

Like 0

Like

0 comments
Show all comments
calculate
summary
Studio_Creatio
8.0

Hi All, question please.

I already googling also searching in Creatio document, but I can not find the answer.

So, how to calculate total summary from all currencies values in Business Process?
There is no summary function there.


Capture :

 

Need advice please, thank you.

Like 0

Like

1 comments

Hello,

First of all you read only 1 record in the "Read Insurance" read data element (it can be seen from the "First item of resulting collection" macro value). The sum of this will always be the value you read. I think something else was intended here.

Next, you can use Enumerable.Sum method, but you need to get an enumerable. Or introduce a method that can be called inside a script task like (and add Terrasoft.Core.DB to the process usings):

protected decimal GetInsurancePremiTotal(Guid insuranceTypeId) { //or any other argument suitable
    var query = (Select)new Select(UserConnection)
        .Column(Func.Sum("UsrPremi")).As("TotalPremi")
        .From("UsrInsurance").As("usrInsurance").WithHints(new NoLockHint())
        .Where("usrInsurance", "UsrTypeId").IsEqual(Column.Parameter(insuranceTypeId));
    decimal totalPremi = 0;
    using (DBExecutor executor = UserConnection.EnsureDBConnection()) {
        totalPremi = query.ExecuteScalar<decimal>(executor);
    }
    return totalPremi;
}

And set the result to process parameter and then use this parameter value to proceed in the business process.

Show all comments
Studio_Creatio
8.0

Hi all, 

contrarily to normal quickfilters, there does not seem to be a nocode option to filter the owner in the timeline component using nocode tools. Any idea how to fitler the owner, for example by system users of a certain role ?



thanks, 

Damien

Like 0

Like

1 comments

Hello,

As far as I understood you need to filter options in the "Owner" filter dropdown list. There is only one option to do that - override the crt.LoadDataRequest as (and also include "@creatio-devkit/common" to the schema dependencies):

{
                request: "crt.LoadDataRequest",
                handler: async (request, next) => {
                    if (request.dataSourceName?.includes("ByOwnerQuickFilterInTimeline_ComboBox_List_DS")) {
                        const filterGroup = new sdk.FilterGroup();
                        await filterGroup.addSchemaColumnFilterWithParameter(
                            sdk.ComparisonType.Equal, "Name", "Supervisor"); //add other filters here
                            const filterParameter = {
                                type: "filter",
                                value: {
                                    filterType: 6,
                                    logicalOperation: 0,
                                    isEnabled: true,
                                    trimDateTimeParameterToDate: false,
                                    items: filterGroup.items
                                }
                            };
                            request.parameters = request.parameters
                                ? [...request.parameters, filterParameter]
                                : [filterParameter];
                    }
                    return await next?.handle(request);
                }
            }

You also need to confirm the data source name. The easiest way to do that is to add console.log("LoadDataRequest:", request.dataSourceName); to the crt.LoadDataRequest override and see which datasource is logged when you first click this "Owner" filter.

Show all comments
How_can_I_bind_record_permissions_for_a_custom_object_in_Creatio_8.0?

Hello,

I am working with Creatio 8.0 using Freedom UI and have created a custom object.

I have configured record permissions for this object and now I need to deploy/migrate these record-permission configurations to another Creatio environment using a package.

I would like to know:

  1. How can I bind these record permissions to my package so that they are automatically installed in another environment?
  2. Do I need to use a SQL script in the package to migrate these permissions?

I am specifically looking for the recommended approach for binding/deploying these record permissions through a package, rather than manually configuring them in each environment.

Any guidance or example would be greatly appreciated.

Thank you!

Like 0

Like

2 comments

Hello,

Record permission definitions are stored in the SysEntitySchemaRecordDefRight table, while the actual record-level permissions are stored in system-generated tables such as SysCaseRight, SysContactRight, or, in general, Sys[ObjectName]Right.

Unfortunately, neither SysEntitySchemaRecordDefRight nor Sys[ObjectName]Right records can be migrated using the standard OOTB data binding mechanism available in packages and require an SQL script to be transfered between environments.

Example you might find useful:

INSERT INTO "SysFolderTreeRight"("Id","RecordId","SysAdminUnitId","Operation","RightLevel","Position")
VALUES ('9f4d6f1c-74f6-4b2d-a7d6-1c9f0f9f0001','ac7a534b-046b-1534-78ac-1b946522dbaf','a29a3ba5-4b0d-de11-9a51-005056c00008',0,1,0)
ON CONFLICT ("Id") DO UPDATE SET
    "RecordId" = EXCLUDED."RecordId",
    "SysAdminUnitId" = EXCLUDED."SysAdminUnitId",
    "Operation" = EXCLUDED."Operation",
    "RightLevel" = EXCLUDED."RightLevel",
    "Position" = EXCLUDED."Position";

Hi Oshi Varshney,

Two tables are involved, and only one of them is usually worth migrating:

  • SysEntitySchemaRecordDefRight — the record permission rules you configured (which role gets Read / Edit / Delete by default). This is what you want to move.
  • Sys[YourObject]Right — the actual per-record rights generated at runtime. Leave these alone; the target environment regenerates them.

1. Find your object's SubjectSchemaUId

System Designer → Object permissions → search your object → open it. The UId is right there in the URL:

.../#/AdministratedObjects/25d7c1ab-1de0-4501-b402-02e0e5a72d6e

Or from SQL:

SELECT "UId" FROM "SysSchema" WHERE "Name" = 'UsrYourObject';

2. Generate the INSERT on Dev (PostgreSQL)

WITH TargetPermissions AS (
    SELECT "Id", "AuthorSysAdminUnitId", "GranteeSysAdminUnitId",
           "Operation", "RightLevel", "Position", "SubjectSchemaUId"
    FROM public."SysEntitySchemaRecordDefRight"
    WHERE "SubjectSchemaUId" = '<YOUR-OBJECT-UID>'::uuid
)
SELECT
  'INSERT INTO public."SysEntitySchemaRecordDefRight" ("Id", "AuthorSysAdminUnitId", "GranteeSysAdminUnitId", "Operation", "RightLevel", "Position", "SubjectSchemaUId") VALUES ' || CHR(10) ||
  string_agg(
      '    (' || COALESCE(quote_literal("Id"::text) || '::uuid', 'NULL') || ', '
      || COALESCE(quote_literal("AuthorSysAdminUnitId"::text) || '::uuid', 'NULL') || ', '
      || COALESCE(quote_literal("GranteeSysAdminUnitId"::text) || '::uuid', 'NULL') || ', '
      || COALESCE("Operation"::text, '0') || ', '
      || COALESCE("RightLevel"::text, '0') || ', '
      || COALESCE("Position"::text, '0') || ', '
      || COALESCE(quote_literal("SubjectSchemaUId"::text) || '::uuid', 'NULL') || ')',
      ',' || CHR(10)
  ) || CHR(10) ||
  'ON CONFLICT ("Id") DO UPDATE SET ' ||
  '"AuthorSysAdminUnitId" = EXCLUDED."AuthorSysAdminUnitId", ' ||
  '"GranteeSysAdminUnitId" = EXCLUDED."GranteeSysAdminUnitId", ' ||
  '"Operation" = EXCLUDED."Operation", ' ||
  '"RightLevel" = EXCLUDED."RightLevel", ' ||
  '"Position" = EXCLUDED."Position", ' ||
  '"SubjectSchemaUId" = EXCLUDED."SubjectSchemaUId";' AS insert_sql
FROM TargetPermissions;

The ON CONFLICT ... DO UPDATE is the important part — it makes the script idempotent, so re-running the package install is safe.

Sample of what it produces:

INSERT INTO public."SysEntitySchemaRecordDefRight"
    ("Id", "AuthorSysAdminUnitId", "GranteeSysAdminUnitId", "Operation", "RightLevel", "Position", "SubjectSchemaUId")
VALUES
    ('73dab094-c821-4025-840b-c8d05d519a72'::uuid, 'a29a3ba5-4b0d-de11-9a51-005056c00008'::uuid,
     'b9c3d55d-6598-473b-901b-021399383963'::uuid, 2, 1, 0, '<YOUR-OBJECT-UID>'::uuid)
ON CONFLICT ("Id") DO UPDATE SET
    "AuthorSysAdminUnitId" = EXCLUDED."AuthorSysAdminUnitId",
    "GranteeSysAdminUnitId" = EXCLUDED."GranteeSysAdminUnitId",
    "Operation"            = EXCLUDED."Operation",
    "RightLevel"           = EXCLUDED."RightLevel",
    "Position"             = EXCLUDED."Position",
    "SubjectSchemaUId"     = EXCLUDED."SubjectSchemaUId";

Column meanings: Operation 0 = Read, 1 = Edit, 2 = Delete. RightLevel 1 = granted, 2 = granted with delegation. Position = the order the rules are listed in.

3. Bind it to the package — this is the part that makes it automatic

Configuration → select your package → Add → SQL script. Set:

  • DBMS type: PostgreSQL (Creatio cloud is Postgres-only; MSSQL/Oracle need a separate SQL script schema each, with MERGE or an IF EXISTS guard instead of ON CONFLICT)
  • Installation type: AfterSchemaData, so it runs after the object and any bound data are installed
  • Backward compatible: tick it if you want the package rollback path preserved

4. Make sure the roles exist in the target first

GranteeSysAdminUnitId points at SysAdminUnit rows. 

5. After install, actualize

Record permission rules only apply to records created after the rule exists. In the target environment, open the object's record permissions and run Actions → Update record permissions so existing records pick them up. It's resource-intensive on large tables, so schedule it off-hours.


BR,
Bala.

Show all comments
New_in_Syntech
tile_view
syntech
new release

Hi Creatio Community!

SYNTECH has released Syntech Tile View for Creatio, a no-code Freedom UI component that displays Creatio records as interactive tiles.

The component supports:

Drill-down KPI cards
Aggregated cards show fact, plan and percentage achievement grouped by a configurable hierarchy. Green, yellow and red statuses and progress bars provide an instant overview. Click a card to move to the next level; use breadcrumbs to return.

Context-filtered records, columns and feed
The lowest level opens records from the current object or a linked detail object. Users can choose, reorder, resize and sort columns. The record feed supports updates, comments, @mentions and file attachments.

Attach to any section, configure per level
Set the object, hierarchy levels, metrics, colour thresholds, grid size, avatars and columns directly in the component. Each level can be tuned individually, and settings are saved per element. The same widget can be used in any section.

Technical details

  • UI framework: Freedom UI
  • Compatibility: Creatio 8.3.0 and up
  • Type: Paid component

Marketplace page:
https://marketplace.creatio.com/app/syntech-tile-view-creatio

Which Creatio section would you configure Tile View for first?

Like 1

Like

Share

0 comments
Show all comments