Hello,

 

I am trying to automate the gathering of data using some business process that perform API calls to one of our client private APIs. I have defined the WebServices with no problem like the one from this example:

 

 

And sending the test request with a valid API Key and Authorization token works perfectly. However, if I try to group all of this inside a business process I get an error that I don't know how to solve. This is the business process:

 

 

And the error that I get exactly on the web service call is this one:

 

 

The full error message states:

Terrasoft.Common.UnsupportedTypeException: Type "System.Collections.Generic.List`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" is not supported.

 

I have done some tests and I can confirm that the error only appears when I try to use a the valid Authorization token retrieved previously, and if I set any other value in that Web Service parameter I don't get the error but obviously the call fails because I am using and incorrect token.

 

The length of the token is 299 characters and as it is an authorization token, it must be preceded by the word "Bearer", so the full value that I am passing to that parameter is "Bearer " with a total length of 306 characters. I also tested using some random strings of length 500+ and the error doesn't show up, so it is not related to a limit of the parameter length. I also checked that the token I am passing is 'correct', i.e. no breaklines, weird characters (not UTF-8) or anything that could cause problems with the encoding of the string.

 

Therefore, I guess it is something related to the way Creatio builds the API request from inside the process, that is not the same as doing from a test request inside the Web Service...

 

Your help is highly appreciated.

Regards.

Like 0

Like

2 comments

Note: I have not tried yet to perform the same kind of requests inside a business process to another API (like a public one), but the error I am getting is not related to the API I am using, it must something related to the Creatio business process logic when invoking web services methods, regardless of the endpoint and the API specifications.

Hello,

 

I recommend that you create a support request.

Show all comments

Dear colleagues,

 

If have a couple of process calls in a client module, very similar, one works and the another ones fails before to call the process getting a "400 (Bad Request)" error

 

Here is the code, the first one fails:

OnGeneraDetalleContratoBtnClick: function() { 
	// Guarda el registro, por si hubo cambios
	this.save();
 
	const RunProcessRequest = Ext.create( "Terrasoft.RunProcessRequest", { 
		// El nombre del Proceso
		"schemaName": "NdosCreaDetalleContrato", 
 
		// Parámetros de entrada
		"parameterValues": { 
			"NdosGrupoEconomicoID": this.get( "NdosGrupoEconomico" ),
			"NdosContratoID": this.get( "Id")
 
		},
 
		// Parámetros de Salida - True => Hay sucursales
		"resultParameterNames": [ 
			"NdosReturn"
 
		]
	} ); 
 
	// Ejecuta el proceso
console.log( RunProcessRequest );
// THIS gets error "400 (Bad Request)" here in the execute	//ERROR ERROR HERE HERE			
	RunProcessRequest.execute(function(response) { 
		// Si OK, actualiza el valor en funcion de la salida
		if (response.isSuccess()) { 
			// Actualiza la cantidad de meses que dura el contrato
			if ( response.resultParameterValues[ "NdosReturn" ] === true ) {
				// Tiene sucursales, inhablitita el boton...
				this.set( "NdosDetalleContratoGenerado", true );		
 
				}
		} 
	}, this ); 
},

 

This another wroks fine and are (as I saw identical!!)

// Jalcon - NoCode-Services - 20240110 - 
// Cambia alguna de las fechas del Contrato, debe ajustar la duración en meses del mismo
updateDuracionContratoMeses: function() { 
	const runProcessRequest = Ext.create("Terrasoft.RunProcessRequest", { 
		// El nombre del Proceso
		"schemaName": "Jfl_MesesEntreDosFechas", 
 
		// Parámetros de entrada
		"parameterValues": { 
			"NdosFechaInicial": this.get( "NdosFechaInicio" ), 
			"NdosFechaFinal": this.get( "NdosFechaFinContrato" )
		},
 
		// Parámetros de Salida
		"resultParameterNames": [ 
			"NdosCantidadDeMeses"
 
		] 
	}); 
 
	// Ejecuta el proceso
	runProcessRequest.execute(function(response) { 
		// Si OK, actualiza el valor en funcion de la salida
		if (response.isSuccess()) { 
			// Actualiza la cantidad de meses que dura el contrato
			this.set( "NdosMesesDuracionContrato", response.resultParameterValues[ "NdosCantidadDeMeses" ] ); 
 
			// Si el contrato ya tiene importe, cctualiza el importe del Contrato
			if( this.get( "NdosImporteMensualContrato" ) > 0 ) {
				this.set( "NdosMontoContrato", this.get( "NdosImporteMensualContrato" ) * this.get( "NdosMesesDuracionContrato" ) );
				}
 
		} 
	}, this); 
} 

 

This is part of the error, console log

 
       POST https://XXXXXX.creatio.com/0/ServiceModel/ProcessEngineService.svc/RunProcess 400 (Bad Request)
 
all-combined.js?v=8.1.1.3635:41 Error al enviar solicitud 
	estado de respuesta: 400 (Bad Request)
	url de solicitud: ../ServiceModel/ProcessEngineService.svc/RunProcess

Some ideas? please help

 

regards,

 

Julio Falcón

Like 0

Like

3 comments
Best reply

Hi Julio,

 

Just guessing, is "NdosGrupoEconomico" a lookup? The parameter is named with an Id, so assuming it is. If that is the case, you need to get it's value, right now it's sending the entire object from the lookup. 

For example (note, the .value at the end): 

"NdosGrupoEconomicoID": this.get("NdosGrupoEconomico").value

However, if it's possible that the lookup can be blank, might be a good idea to check for that as well.

Ryan

Hi Julio,

 

Just guessing, is "NdosGrupoEconomico" a lookup? The parameter is named with an Id, so assuming it is. If that is the case, you need to get it's value, right now it's sending the entire object from the lookup. 

For example (note, the .value at the end): 

"NdosGrupoEconomicoID": this.get("NdosGrupoEconomico").value

However, if it's possible that the lookup can be blank, might be a good idea to check for that as well.

Ryan

Hello Julio,

 

Can you please share the RunProcess request body (from the network tab in the console)? We can compare it to the successful calls and see the difference. Additionally you need to check if both retrieved values (using this.get getters) are strings.

Ryan Farley,

Thanks Ryan, you are right. Fortunately I had already found my mistake... almost a beginner's mistake :-(

Show all comments

Hello,

 

I've noticed a problem when users try to import data. For example, they select the Case object  to add data and upload an excel file with columns that correspond to lookup fields in the case. If the lookup value already exists in Creatio there is no problem and the field will be filled with that value, but if it does not exist, Creatio does not allow the user to create that new value and will throw the following error inside the ExcelImportLog page:

 

Current user does not have sufficient permissions to run "CanManageLookups"

 

If I change this operation permission and allow it for a given user, it will work fine but then that user has complete access to the Lookups section. This means that he is able to see all the lookups, create new values and remove them if they want. This is not a good practice and implies security issues.

 

Therefore, is there another way to achieve what I want without having this risk?

 

PD: I don't know if it may be an incidence related with my own environment, because I haven't noticed this behavior in any other Creatio instance before and it seems to happen only with some lookups, not all of them.

 

Regards

Like 0

Like

1 comments

Hello,

 

Unfortunately, it is not possible to allow users to have access to specific lookups only, but we have already registered the following suggestion for our R&D team and they will consider adding the following functionality in the upcoming releases.



However, we can offer you a workaround, but it is also worth noting that this is a workaround and that you can only track which rights have been issued through the database.



1. Grant everyone the rights to the CanManageLookups operation

2. Enable administration by records for the Lookup object.

In this case, do not configure the administration privileges.

Thus, there will be access to the lookup section, but only the author of the lookup will have rights to the records themselves (for system directories, this will be the Supervisor)

3. Using the BP and the element of granting rights, grant rights only to the required record.

Show all comments

after adding ssl the websocket in pending status

 

Like 0

Like

1 comments

Greetings,



We kindly ask you to contact us via email at support@creatio.com for an in-depth analysis of your error.

Show all comments

Good day!

 

The report is generated in Word format.

Website version 7.18.5

Screenshot attached

 

In one of our tables, we have several products linked to a specific Id. Each product is associated with its unique point of inclusion address. The product names are successfully pulled and correctly displayed in the report table - each name in a separate line, which fully meets our requirements. We set this up through the table part report settings.

 

The problem arises with the addresses of the points of inclusion, the values for which we obtain using a macro. In the current configuration, all addresses for the three products are collected and displayed in one line of the table, instead of being located in the corresponding lines opposite each product.

 

Question:

Could you advise on how we might modify the macro or the process of its operation so that the addresses of the points of inclusion are placed in separate cells of the table in accordance with each product?

File attachments
Like 0

Like

1 comments

Hello,

 

Could you please provide us with an example of the macro you are using?

Please provide the table settings, and also take a screenshot of how this table looks specifically in the printable template in word plugin.

Show all comments

Hi, 

 

is there a code, script or library or a workaround in freedom UI (not classic) to do a dropdown list with multi select (I am using the new Version: Quantum) 

Like 1

Like

1 comments

Hi all,

 

How would one add a boolean type static filter to a section (similar to the Active flag in the Process Library)?

 





I have a field called UsrActive in my section and I'd like to have this filter applied by default.

 

Nb. I'm not currently using Freedom sections.

Like 0

Like

1 comments
Best reply

Hello,

 

In order to implement such logic in the Classic UI additional development is needed. You may refer to the below post for an example of similar implementation:

https://community.creatio.com/questions/please-help-how-add-custom-filt…

 

Best regards,

Anastasiia

Hello,

 

In order to implement such logic in the Classic UI additional development is needed. You may refer to the below post for an example of similar implementation:

https://community.creatio.com/questions/please-help-how-add-custom-filt…

 

Best regards,

Anastasiia

Show all comments

Dear colleagues,

 

I'm having a problem running my Creatio local environment when use PostgreSQL.

 

When start the app, I'm getting this error Exception Details: Npgsql.PostgresException: 28000: no hay una l�nea en pg_hba.conf para �fe80::1c5:206f:bef4:e3e9%13�, usuario �dev-toledano�, base de datos �Toledano8010�, sin cifrado

 

I have app and db in the same machine.

 

I saw I need to change the pg_hba.conf file, I did it, but get the same error. This is my file

# TYPE  DATABASE        USER            ADDRESS                 METHOD
 
#host all all 0.0.0.0/0 trust
 
# "local" is for Unix domain socket connections only
local   all             all                                     trust
#scram-sha-256
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     all                                     trust
host    replication     all             127.0.0.1/32            trust
host    replication     all             ::1/128                 trust

And my ConnectionStrings.config file looks like

<?xml version="1.0" encoding="utf-8"?>
<connectionStrings>
  <add name="db" connectionString="Server=NoCodeServicesT;Port=5432;Database=Toledano8010;User ID=dev-toledano;password=dev-toledano;Timeout=500; CommandTimeout=400;MaxPoolSize=1024;" />
  <add name="redis" connectionString="host=localhost; db=2; port=6379" />
  <add name="defPackagesWorkingCopyPath" connectionString="%TEMP%\%APPLICATION%\%APPPOOLIDENTITY%\%WORKSPACE%\TerrasoftPackages" />
  <add name="tempDirectoryPath" connectionString="%TEMP%\%APPLICATION%\%APPPOOLIDENTITY%\%WORKSPACE%\" />
  <add name="sourceControlAuthPath" connectionString="%TEMP%\%APPLICATION%\%APPPOOLIDENTITY%\%WORKSPACE%\Svn" />
  <add name="elasticsearchCredentials" connectionString="User=gs-es; Password=DEQpJMfKqUVTWg9wYVgi;" />
  <add name="influx" connectionString="url=http://10.0.7.161:30359; user=; password=; batchIntervalMs=5000" />
  <add name="messageBroker" connectionString="amqp://guest:guest@localhost/BPMonlineSolution" />
</connectionStrings>

Somebody have some idea?

 

I never worked with PostgreSQL before 

 

Thanks in advance,

 

Best regards

Like 0

Like

2 comments
local   all             postgres                                peer
 
# TYPE  DATABASE        USER            ADDRESS                 METHOD
 
# "local" is for Unix domain socket connections only
local   all             all                                     peer
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     all                                     peer
host    replication     all             127.0.0.1/32            md5
host    replication     all             ::1/128                 md5
host all all 10.0.0.0/24 trust

Here is Mine, maybe you need an "Host all all  "  and your local subnet?

Hello,

 

Here are some recommendations:

  1. Update your pg_hba.conf file with the following content:

local all all trust

host all all 127.0.0.1/32 trust

host all all ::1/128 trust

 

  1. Verify that your connection string in the ConnectionStrings.config file is accurate, including the Server, Port, Database, User ID, and Password settings.

  2. Restart PostgreSQL after updating pg_hba.conf using the command: sudo service postgresql restart.

  3. Test your connection to ensure the error is resolved.

Show all comments

Hello Everyone,

I have a progress bar that changes its status based on approval status. However, it requires a manual page refresh to reflect the changes in the progress bar. To address this, I've added a refresh button. Now, I want this button to trigger automatically whenever the progress bar status changes. Can anyone provide guidance on how I can achieve this using a custom handler?

Currently, I've written this code with the assumption that the record is saved whenever the status changes.

    {

    request: "crt.SaveRecordRequest",

    handler: async (request, next) => {

        const schemaName = "UsrNewProductsOnboardingformpage";  

        const buttonId = "Button_qef55yg";

        const button = request.$record.$Model[schemaName].$Buttons[buttonId];

        if (button) {

            button.instance.execute();

            console.log("Button clicked");

        } else {

            console.log("Button not found");

        }

        return next?.handle(request);

    }

}

Like 1

Like

4 comments

Have you tried turning on "Enable Live Data Update" for the object? Turning that on should make it refresh automatically when the data changes with no code. 

See https://customerfx.com/article/automatically-refreshing-a-creatio-freed…

Alternatively, you could add code to refresh the page: https://customerfx.com/article/refreshing-reloading-page-or-list-data-o…

Ryan

Ryan Farley,

Hi Ryan,

I tried enabling "Live Data Updates" for the object, but it still didn't work out. Will try the alternate approach to see if it's work.



Thanks 

 

Abhishek,

 

Hello,

 

Try this handler in the page (don't forget to add creatio-devkit/common to  your page schema (example define("UsrTest_FormPage", /**SCHEMA_DEPS*/["@creatio-devkit/common"]/**SCHEMA_DEPS*/, function/**SCHEMA_ARGS*/(sdk)/**SCHEMA_ARGS*/ {):

{
				request: "crt.ApprovalActionHandlerRequest",
				handler: async (request, next) =&gt; {
					const result = await next?.handle(request);
					const handlerChain = sdk.HandlerChainService.instance;
					await handlerChain.process({
						$context: request.$context,
						type: 'crt.LoadDataRequest',
							config: {
								"loadType": "reload",
								"useLastLoadParameters": true
							},
							"dataSourceName": "PDS"
					});
				}
			}

Worked correctly in my demo.

Oleg Drobina,

Hello,

I tried, but it didn't work, nor did it even trigger after the changes. Do I need to change the request from "crt.ApprovalActionHandlerRequest" to any other request?

Show all comments

Dear Colleagues,

 

Is anyway possible to "extract" or move a custom package I did (my error) in the production environment of a customer.

 

I need to move it on my local dev environment to improve it and later to install on test & later in production?

 

Thanks in advance

 

Best regards

Julio Falcon

Like 0

Like

1 comments

Greetings,



Please take note that it is not possible and we highly do not recommend exporting the "Custom" package itself.

If you would like to migrate basic objects and schemas from the "Custom" package - it is best to create a separate new package, copy all the "Custom" objects and schemas into the new one and furthermore use it for customization and exporting functionality.

Show all comments