QueueItem
list
column
removed
Studio_Creatio
8.0

Hello,

I have noticed that configuring a list to display Agent desktop queue element (QueueItem) always results in the default column displaying 'Colum removed'. It is pointing to Caption of QueueItem.

When you try to remove it (hide) and save you will be unable to open the page in no-code configuration. Console returns: Cannot read properties of null. 

Essentially we have to display this default column or the page breaks in configuration. From UI perspective it opens regardless.

I have observed this in multiple environments with versions 8.2 and higher. 

It is not a big issue but I am wondering if anyone has encountered this or has a solution for this.

Like 0

Like

0 comments
Show all comments
Auto-number_sequence_generation_not_working_in_Creatio_Online_environment
Studio_Creatio
8.0

Hello,

We are importing data from an external ERP system and creating records (e.g., Orders / Invoices) via backend code. These objects have an auto-number column (“Number”) configured with a prefix such as ORD- or INV-.

We attempted to generate the next auto-number value by querying the database sequence directly using SQL like NEXT VALUE FOR based on the column UID. This approach works in some local environments but fails in Creatio Online. The query either throws an error or does not return the expected value.

Below is the code we have written for next sequence:
 EntitySchema entitySchema = userConnection.EntitySchemaManager.GetInstanceByName(objectName);
                    var numberColumn = entitySchema.Columns.GetByName("Number");
                    string sequenceName = numberColumn.UId.ToString();
                    
                    long nextValue=0;

                    try
                    {
                        string sql = $"SELECT NEXT VALUE FOR dbo.[{sequenceName}]";
                        
                        using (var dbExecutor = userConnection.EnsureDBConnection())
                        {
                            using (var reader = new CustomQuery(userConnection, sql).ExecuteReader(dbExecutor))
                            {
                                if (reader.Read())
                                {
                                    nextValue = reader.GetInt64(0);        
                                }
                            }
                        }
                    }
                    catch(Exception ex)
                    {
                        
                    }

The trail online version of Creatio is "8.3.2.4199". 

What are we missing here?

Any help would be appreciated.

Like 0

Like

1 comments

First of all, how are you loading the orders/invoices? It should be creating these numbers unless you're going directly to the database (or the numbers are being created using the older method on the client-side page only).

I assume that somewhere you're setting the nextValue in the Number field and that just isn't showing in the code?

Show all comments
#email
Studio_Creatio
8.0

Hi All,

We are trying to autofill To and From in email from Creatio. We designed business process to read To and From email from contacts. We are using mini email template. How can we auto-populate to and from in the business process? Thanks

Like 0

Like

2 comments

Hello,

The easiest and most reliable way to implement this is by using the Send Email element in the business process.

You can configure it as follows:

1. "From" Field:

Add the Send Email element to your business process.

In the element setup, locate the From parameter.

Select a mailbox that is configured in the Mailbox synchronization settings,
or map this field to a process parameter that contains the mailbox information (this parameter should reference the Mailbox synchronization settings lookup).

2. "To" Field:

In the same Send Email element, locate the To parameter.

Map this field to a process parameter of type Contact or Account. In this case, the system will automatically use the primary email address specified in the Communication options of that Contact or Account.

Alternatively, you can manually specify the target email address or map the field to a parameter that contains the required email value.

Additionally, you can select the required email template within the Send Email element.

Anastasiia Zhmud,

Thanks Anastasiia - Just to clarify, we need to give a button on the UI for sending emails manually to the user. I want the email mini page to open with autofilled To and From. The user can then put subject and email body and send manually. To and From parameters are not visible on the email mini page. Am I missing anything here?

Show all comments
#lookup
Studio_Creatio
8.0

Hi All,

 

We are creating a pre-config page where we have two page parameters fields, one is a lookup (lookup 1) and other is multi select with another lookup. I have created a mapping of both the lookup tables. I want to filter multi select field based on the value selected in lookup 1. How can I implement this?

handlers: /**SCHEMA_HANDLERS*/[
			{
  request: "crt.LoadDataRequest",
  handler: async (request, next) => {
    // Ensure this runs only for your MultiSelect list data source
	    console.log("Current DataSourceName:", request.dataSourceName);
	   console.log("EntitySchema:", request.entitySchemaName);
    // Ensure it's the right source + schema
    if (request.dataSourceName !== "MultiSelect_ugo4wdi_List_DS") {
		console.log("Hello I am in a log box 1234");
      return await next?.handle(request);
    }
    const filter = new sdk.FilterGroup();
    // Filter where ImpStateRegion == 'State'
    await filter.addSchemaColumnFilterWithParameter(
      sdk.ComparisonType.Equal,
      "ImpStateRegion", // <-- Column in ImpStateInterestMultiselect to filter on
      "State"           // <-- The fixed value to filter by
    );
    // Workaround for Creatio DevKit filter bug
    const newFilter = Object.assign({}, filter);
	  console.log("Hello I am in a log box");
    newFilter.items = filter.items;
    // Add filter to request parameters
    request.parameters.push({
      type: "filter",
      value: newFilter
    });
    // Proceed with next handler
    return await next?.handle(request);
  }
}
		]/**SCHEMA_HANDLERS*/,
Like 0

Like

0 comments
Show all comments

Hi Community,

I’m on Creatio 8.3.2 (Freedom UI) and I’m trying to set the first tab as the default on every page init, because the designer option under Tabs (“Default tab”) isn’t working in my case, so I’m doing it in code.

What I’m doing

I subscribe to the page model events inside crt.HandleViewModelInitRequest and wait for finish-load-model-attributes, then set the tab index to 0:

{
  request: "crt.HandleViewModelInitRequest",
  handler: async (request, next) => {
    await next?.handle(request);
 
    request.$context.events$.subscribe(async (evt) => {
      const modelMode = await request.$context.getPrimaryModelMode();
 
      if (evt?.type === "finish-load-model-attributes") {
        if (modelMode === "update") {
          request.$context.Tabs_SelectedTabIndex_Profile = 0;
        }
        if (modelMode === "create") {
          request.$context.Tabs_SelectedTabIndex_Profile = 0;
        }
      }
    });
  }
}

The problem

This event is emitted more than once (e.g., when another list/detail inside a tab finishes loading later), so my code keeps re-triggering and forces the UI back to tab 0 even after the user already switched tabs.

Unsubscribe attempt (doesn’t work)

I tried the pattern I saw in a comment on the CustomerFX article about waiting for the model to be loaded (store the returned subscription and call unsubscribe() when the needed payload arrives):customerfx

const sub = request.$context.events$.subscribe(async (evt) => {
  if (evt?.type === "finish-load-model-attributes" && evt?.payload?.SomeAttribute) {
    sub.unsubscribe();
  }
});

But in my case (8.3.2 Freedom UI) this doesn’t seem to work at all.

Questions

  • What is the correct syntax / pattern to unsubscribe from request.$context.events$ subscriptions on Freedom UI pages (8.3.2)?
  • Does events$.subscribe(...) always return an object that supports unsubscribe() in Freedom UI, or is there a different disposal mechanism?
  • Is there a recommended “run once when page is really ready” event/request that avoids finish-load-model-attributes firing multiple times?

If anyone has a working example for 8.3.x (especially for “run once” behavior or proper unsubscribe), I’d really appreciate it.

Like 0

Like

0 comments
Show all comments

Hello,

How can I make text search case-insensitive in the Read data element of a business process?


Different third-party systems write the same code using different letter cases, and because of this the business process doesn’t find an already existing record.

Like 0

Like

1 comments

Hi Vladimir. The best way to solve this case without coding (using esq or smth) is to do the following:

  1. In Account schema add a column with no use in UI - UsrCodeLower.
  2. Create some event-based process to fill this value in case of saved new Account record with Code filled or changed Code field in existing account with the following parameter [#Read account.First record in the resulting collection.Code#].ToLower() then modify Account's UsrCodeLower with it's value:

3. Add to your process for looking for an account by code (this one on the screen) some parameter for "lowered" code value: UsrDistributionNumberLower = UsrDistributionNumber.ToLower(). 

4. In the Read data element replace Code with UsrCodeLower and the parameter to UsrDistributionNumberLower. 

As both values will be in lower case, this should do.

 

 

 

 

Show all comments
#CommunicationPanel
Studio_Creatio
8.0

Hi Team, we have create a couple of custom workflows using custom objects. We are trying to generate notifications by adding records in notification object. The notifications are working fine but the thumbnails are breaking. Attached is the screenshot. How can we resolve this?

Like 0

Like

3 comments

I had that happening on after an upgrade to 8.3.2. It is caused by an issue with a new feature called DisableGenerateViewModuleScriptOptimization, which by default id disabled. You can resolve the issue by enabling that feature. 

The DisableGenerateViewModuleScriptOptimization feature is new in 8.3.2 and is a new feature meant to optimize page opening/reopening. With the feature enabled, the site is no longer using the optimization. The issue is resolved in 8.3.3, so for now, enable the feature, but when 8.3.3 comes out you'll want to disable the feature again so you can use the page optimizations.

This information is from support, my case was SR-01476352 if you end up discussing with support.

Ryan

Ryan Farley,

Thanks for the prompt response, Ryan! I don't see this feature in feature list. Where can I enable this feature?

Puneet Mehta,

This is all for 8.3.2, just FYI, so wanted that to be clear. Also, I don't believe the feature is added in 8.3.2 (although the capabilities are there), so you can just add it, then enable it. 

Don't forget to disable it once your system is upgraded to 8.3.3.

Show all comments
FreedomUI
Requests
crt.CreateRecordRequest
Studio_Creatio
8.0

Hi, community! 

Recently noticed that while executing crt.CreateRecordRequest programmatically I cannot pass default values for page attibutes that are not schema fields. I am aware about defaultValues parameters for CreateRecordRequest and it works correctly for page fields so they are filled in, but no such behaviour for attributes. Maybe it possible to access defaultValues array in the opened page in HandleViewModelInitRequest and set a attribute value manually, but I didn't find the way to do it. Any advices on this are much appreciated.

 

const handlerChain = sdk.HandlerChainService.instance;					
await handlerChain.process({
	type: "crt.CreateRecordRequest",
	entityName: "MySuperEntity",
	$context: request.$context,
	defaultValues: [{
		attributeName: "SomeField", //this is MySuperEntity field and it's filled in the form page correctly
		value: "SomeValue"
	},
	{
		attributeName: "SomeAttribute", //this is MySuperEntity_FormPage attribute and and it's empty in request.$context.SomeAttribute in HandleViewModelInitRequest 
		value: "SomeAnotherValue"
	},
});	
Like 0

Like

6 comments
Best reply

As a workaround approach, I've been using BroadcastChannel API to pass other attribute (non-model) values to the opened page. See the comment in this thread from Edward https://community.creatio.com/questions/open-custom-freedom-ui-page-custom-button-opportunity-edit-page-and-pass-opportunity

Ryan

Hi, Sergejs. You should do it as following:

{
	request: "crt.HandleViewModelResumeRequest",
	handler: async (request, next) =&gt; {
		await next?.handle(request);
		setTimeout(() =&gt; {
			request.$context.Param1 = someValue1;
			request.$context.Param2 = someValue2;
		}, 300);	
	}
}

Dmitry S,

Can you please clarify what is someValue1 and someValue2 in your example? As far as I can understand, you are setting attribute value inside same page in the HandleViewModelResumeRequest.

My scenario is slightly different, I am trying to pass the attribute value from another page. So for instance - I have a button on a page1, this button has a custom click handler, where I call CreateRecordRequest with some parameters. In result page2 opens and I want to set it attribute with the value from the parameter i passed in CreateRecordRequest. I hoped it works automatically, but it's not. I tryed your HandleViewModelResumeRequest code with little modification, but attribute value still is null for me.

			{
				request: "crt.HandleViewModelResumeRequest",
				handler: async (request, next) =&gt; {
					await next?.handle(request);
					setTimeout(() =&gt; {
						const a = request.$context.SomeAttribute; //a is null here
					}, 300);
				}
			},

Sergejs Sokolovs,

You are sending something from parent page to child page ok. So in data model of the created child page you have them, yes? And page is opened.

So, you can get them on the created page as 

const attribute = await request.$context.UsrAttributeName; 

or the problem occurs when you're trying to fill smth virtual? Which exists on the page, but not present in the entity itself? if so, I'll check this tomorrow.

BTW. 

as a workaround you can do the following:

  1. You can create some process like this one with open preconfigured page element. You can configure some process parameters, which will receive data you want to display. You can link these process parameters to the desired page. On the page are all of those parameters accessible.

2. Instead of using record handlers you can run this process from some custom handler on the page somehow like this (also not forget to define ProcessModuleUtilities). Process should open page with all required fields filled. 

["@creatio-devkit/common", "ProcessModuleUtilities"], function (sdk, ProcessModuleUtilities)

You can use something similar from FD sdk indeed, this example was taken from FD page, but it uses CI logic.

const printableId = reportTemplate.value;
const args = {
	sysProcessName: "UsrGenerateContractByTemplate",
	parameters: {
		ContractId: contractId,
		PrintableId: printableId
	}
};
ProcessModuleUtilities.executeProcess(args); 

As a workaround approach, I've been using BroadcastChannel API to pass other attribute (non-model) values to the opened page. See the comment in this thread from Edward https://community.creatio.com/questions/open-custom-freedom-ui-page-custom-button-opportunity-edit-page-and-pass-opportunity

Ryan

Ryan Farley,

Yeah, already started to think about that solution, but hoped there is more native one. It's little bit frustrating, that params are not supported, but it's great that we have a workaround. Thanks!

Yes, the current way to implement the desired logic is to use a workeround, more on it here https://community.creatio.com/articles/passing-data-between-freedom-ui-pages-creatio.
As for a more native approach, it is still in development.

Show all comments
Studio_Creatio
Sales_Creatio
Service_Creatio
Marketing_Creatio
Studio_Creatio
8.0

Hello Everyone,

I want to integrate Creatio with a hardware device (such as a signature pad or scanner). The hardware vendor provides a browser-based SDK for integration.

I would like guidance on the following:

  1. What is the recommended approach to integrate a browser-based hardware SDK with Creatio?
  2. Can the SDK be directly integrated using client-side JavaScript in Creatio (Freedom UI)?
  3. Are there any limitations or security considerations when working with browser-based hardware SDKs in Creatio ?
  4. Has anyone implemented a similar hardware integration in Creatio? If yes, what approach worked best?

Any best practices, documentation references, or real-world examples would be greatly appreciated.

Thank you.

Like 0

Like

1 comments

Hello Ajay,

Unfortunately, Creatio doesn't have instructions for integrating the platform with hardware devices.

Show all comments
Studio_Creatio
Sales_Creatio
Service_Creatio
Marketing_Creatio
#tab#automation#hidden#Shown
Studio_Creatio
8.0

Hi Everyone,

I’m working with a detail object and want to:

• Sort the Costs and Savings Detail table records statically in a fixed order (not dynamic user sorting)
• Also restrict users from re-sorting by clicking column headers

Has anyone implemented a way to enforce a fixed sequence for detail table data in Creatio (or similar object structure)?

Any guidance or best practices would be appreciated.

Thanks in advance!

Like 1

Like

2 comments

Hi, Ajay.

For first you need to setup sorting by some column at Freedom UI designer and turn off sorting at Appearance, save page. :

appearance

Then restore list settings by default:

restore default settings

Result:

Grygorii Synieok, Thank you for the reply.

But, I am currently working in a lower version where the List Header option is not available. Is there an alternative solution for this?

Show all comments