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

Hi,

I'm trying to generate Bearer token using the approach explained in this link in our DEV platform which runs as a Cloud instance: https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/8.0/integrations-and-api/authentication/oauth-2-0-authorization/identity-service-overview#title-2830-2

I'm receiving "unsupported_grant_type" error. I tried both Postman client and Powershell script and got the same error message. Do you have any idea about this issue? Many thanks.

Like 0

Like

2 comments
Best reply

Hello,

According to the instructions, the token request should be sent to the Identity Service URL in the following format:

https://[Identity Service URL]/connect/token

You can find the correct Identity Service URL in the system settings using the code "OAuth20IdentityServerUrl".

Please note that this issue most commonly occurs when the request is sent to an incorrect URL. In Creatio cloud, the Identity Service URL typically corresponds to your site name with the -is suffix. It is important to ensure that:

  • the URL exactly matches the value from the system setting
  • no extra characters or incorrect digits are included
  • the request is sent specifically to the /connect/token endpoint

The request itself should be structured as follows:

curl --location 'https://myidentityservice/connect/token' \
--data-urlencode 'client_id=•••••••' \
--data-urlencode 'client_secret=•••••••' \
--data-urlencode 'grant_type=client_credentials'

I recommend double-checking the URL you are using against the system setting to ensure it is correct.

Hello,

According to the instructions, the token request should be sent to the Identity Service URL in the following format:

https://[Identity Service URL]/connect/token

You can find the correct Identity Service URL in the system settings using the code "OAuth20IdentityServerUrl".

Please note that this issue most commonly occurs when the request is sent to an incorrect URL. In Creatio cloud, the Identity Service URL typically corresponds to your site name with the -is suffix. It is important to ensure that:

  • the URL exactly matches the value from the system setting
  • no extra characters or incorrect digits are included
  • the request is sent specifically to the /connect/token endpoint

The request itself should be structured as follows:

curl --location 'https://myidentityservice/connect/token' \
--data-urlencode 'client_id=•••••••' \
--data-urlencode 'client_secret=•••••••' \
--data-urlencode 'grant_type=client_credentials'

I recommend double-checking the URL you are using against the system setting to ensure it is correct.

Thanks, it worked after getting the correct endpoint!

Show all comments

Hi everybody,

I think this might be useful for development. The task is the following: how can I dynamically change the options of a dynamic filter based on another quick filter (or another parameter)? For example, on a certain page I have a dropdown parameter "City", and a quick filter for Owner that should respect the selected city. If no city is selected, the quick filter should display all records

Here is an example:

What needs to be achieved: if a city is selected in the City dropdown, then the Owner quick filter should display only those contacts whose city matches the selected value. If no city is selected, the quick filter should show all contacts

The code:

This calls crt.LoadDataRequest for the quick filter after the "City" value had changed. 

{
	request: "crt.HandleViewModelAttributeChangeRequest",
		handler: async (request, next) => {
			if (request.attributeName === "ContactDS_City_zsoqmn6") {
				await request.$context.executeRequest({
				    type: "crt.LoadDataRequest",
				    $context: request.$context,
				    config: {
				        loadType: "reload",
				        useLastLoadParameters: true
				    },
				    dataSourceName: "OwnerQuickFilter_ComboBox_List_DS"
				});
			}
		}
	}

And this reloads quick filter dataset depending on the current conditions (in our case includes owner filtration by the owner's city):

{
	request: "crt.LoadDataRequest",
	handler: async (request, next) => {
 
		if (request.dataSourceName === "OwnerQuickFilter_ComboBox_List_DS") {
			const filter = new sdk.FilterGroup();
			const selectedCity = await request.$context.ContactDS_City_zsoqmn6;
			if (selectedCity) {
				await filter.addSchemaColumnFilterWithParameter(
			        sdk.ComparisonType.Equal, 
			        "City", 
			        selectedCity.value
			    );
			} else {
				await filter.addSchemaColumnIsNotNullFilter("Id");
			}
			const newFilter = Object.assign({}, filter);
			newFilter.items = filter.items;
			if (!request.parameters) {
				request.parameters = [];
			}
			request.parameters.push({
				type: "filter",
				value: newFilter
			});
		}
		return await next?.handle(request);
	}
}

The result:

a) Some City was selected:

b) Nothing was selected

Like 1

Like

Share

0 comments
Show all comments
How_to_Automate_a_Business_Process_Using_a_Dynamic_Filter
Sales_Creatio
8.0

Hello Creatio Support Team,

I need to implement a scenario where users create a dynamic filter during the day, and a business process should automatically run at night using that filter.

What is the recommended way to implement this in Creatio so that the BP correctly retrieves and applies the dynamic filter at runtime?

Like 1

Like

1 comments

You can get the filter from a user created folder in a process using code. Then you can use that filter with an EntitySchemaQuery. See https://customerfx.com/article/programmatically-using-section-folder-filters-in-processes-or-server-side-code-in-creatio/

Ryan

Show all comments

Hi Support,

We have a ready made excel reports built using Excel Reports Builder for Creatio (https://marketplace.creatio.com/app/excel-reports-builder-creatio). Now we have a requirement to automatically generate the excel report via Business Process through a timer signal and send it as attachment in Email Activity. Any idea how to generate the report from Excel Reports Builder via script task? 

 

Like 0

Like

2 comments

Not sure about doing it via a script task (although I assume is possible) however, there is a process element that can be used to generate Excel reports in current versions of the add-on. It works in a similar way to how the Process File element works for Word printables. You can generate and attach to an email all with no code.

Ryan

Thank you Ryan Farley

Show all comments

I am currently unable to export Applications from the Application hub. The option doesn't show up in the menu after clicking the three dots. Am I missing any operation permissions? or System setting? I'm not sure where to start looking. This is happening to all of the Applications in the hub, even ones created within the instance.

Like 0

Like

4 comments
Best reply

Please ensure that the feature is enabled for the current user.



Also, please clear the cache and re-login to the system. After that, the functionality should work as expected. If it does not, please submit a ticket to Creatio Support.

Hello,

Please enable the "CanDownloadApp" feature in the Features section. Once enabled, the functionality should become available.

Andrii Kendzor,

I appreciate the response, but unfortunately turning this feature on did not work

Please ensure that the feature is enabled for the current user.



Also, please clear the cache and re-login to the system. After that, the functionality should work as expected. If it does not, please submit a ticket to Creatio Support.

Andrii Kendzor,

Thank you so much, this fixed the problem for me!

Show all comments