I have an object called ItalVinculacion, and inside it I have to read the content of ItalProduct, which is also an object, and obtain the values ​​of ItalEjeAplicacion and Type, which are objects within the product.

This is my code:

var autoId = Get<Guid>("IdAuto"); // ID del auto en ItalAutosNormalizados
var IdProduct = Get<Guid>("IdProduct"); // ID del producto de la nueva vinculación
var IdAxis = Get<Guid>("IdAxis"); 
var IdSubFamily = Get<Guid>("IdSubFamily"); 
 
if (IdProduct == Guid.Empty) {
    return false;
}
 
// Buscar vinculaciones existentes con el mismo auto
var vinculacionEsq = new EntitySchemaQuery(UserConnection.EntitySchemaManager, "ItalVinculacion");
vinculacionEsq.AddColumn("Id");
vinculacionEsq.AddColumn("ItalPriority");
 
// Acceder a las columnas del objeto relacionado ItalProduct usando alias
var ejeAplicacionColumn = vinculacionEsq.AddColumn("ItalProduct.ItalEjeAplicacion");
ejeAplicacionColumn.Name = "ItalEjeAplicacion";
 
var typeColumn = vinculacionEsq.AddColumn("ItalProduct.Type");
typeColumn.Name = "Type";
 
vinculacionEsq.Filters.Add(vinculacionEsq.CreateFilterWithParameters(FilterComparisonType.Equal, "ItalFleetID", autoId));
 
var existingVinculaciones = vinculacionEsq.GetEntityCollection(UserConnection);
int maxPriority = 0;
bool isDuplicateFound = false;
 
foreach (var vinculation in existingVinculaciones) {
    var existingEjeAplicacion = vinculation.GetTypedColumnValue<Guid>("ItalEjeAplicacion");
    var existingType = vinculation.GetTypedColumnValue<Guid>("Type");
 
    // Comparar GUIDs correctamente
    if (existingEjeAplicacion.Equals(IdAxis) && existingType.Equals(IdSubFamily)) {
        isDuplicateFound = true;
        var existingPriority = vinculation.GetTypedColumnValue<int>("ItalPriority");
 
        if (existingPriority == 0) {
            vinculation.SetColumnValue("ItalPriority", 1);
            Set("ItalPriority", 2);
        } else {
            Set("ItalPriority", existingPriority + 1);
            vinculation.SetColumnValue("ItalPriority", existingPriority + 1);
        }
 
        vinculation.Save();
        break; // Salir del bucle si se encuentra un duplicado
    }
 
    maxPriority = Math.Max(maxPriority, vinculation.GetTypedColumnValue<int>("ItalPriority"));
}
 
// Si no se encontró un duplicado, establece la prioridad de la nueva vinculación
if (!isDuplicateFound) {
    Set("ItalPriority", maxPriority + 1);
}
 
return true;

 

And this is the error:

Terrasoft.Common.ItemNotFoundException: Value "ItalProduct.ItalEjeAplicacion" was not found.

 

Like 0

Like

2 comments

Try using ItalEjeAplicacionId instead of ItalEjeAplicacion. This is the only assumption for now.

Oleg Drobina,

Thanks Oleg, I'll try it.

Show all comments

I dont know what to fill in the tenant id field in creatio office 365 setup, pls kindly help

Like 0

Like

1 comments
Best reply

Hi,

 

The Tenant ID value should be taken from the "Directory (tenant) ID" in Azure.

 

 

The Tenant ID parameter needs to be filled in only if the user uses the Office 365 (Graph API) service type. When switching to the Graph API, the user will gain the ability to automatically create Teams meetings.

 

This is not a mandatory field if you are using Exchange and Office 365 (EWS) and not using Office 365 (Graph API). 

You can leave it blank.

 

 

Hi,

 

The Tenant ID value should be taken from the "Directory (tenant) ID" in Azure.

 

 

The Tenant ID parameter needs to be filled in only if the user uses the Office 365 (Graph API) service type. When switching to the Graph API, the user will gain the ability to automatically create Teams meetings.

 

This is not a mandatory field if you are using Exchange and Office 365 (EWS) and not using Office 365 (Graph API). 

You can leave it blank.

 

 

Show all comments

Hello,

 

I need to create a page in freedom UI and add it as a section without linking it to a model, meaning that this page operates freely without having a business object related to it.

 

The purpose is to call external API and retrieve values to be populated in a table/list, and it does not need to be related to any model inside creatio. No need to add-edit-delete for the model, a free customizable page that I can fully control from code level.

 

Thanks

Like 1

Like

1 comments

Hello

Is there a way to do something like the list of products in order in the mobile application?

I am creating a custom section with the same functionality, but it has to be able to be reflected in the mobile application.

I would like to know if it is possible to do it in the mobile application or an alternative since the idea is that users can select records from a catalog and have them included in a new record. 

Like 1

Like

1 comments

Hi Laura,
 

You can find an example of this implementation in the following link:
https://community.creatio.com/questions/enable-product-catalog-list-ord…

Additionaly, here you can find a link tree with all the information you would need for mobile application development.
 

I hope this helps. Have a great day!

Show all comments

Hi Team,
When i am trying to Change from Freedom UI to Classic UI in mobile but it is not changing to classic UI.
In the Mobile Workplace of the Mobile Application wizard, when I uncheck the option to disable the Freedom UI and save the changes, it still shows as enabled when I reopen it. As a result, I’m unable to switch from the Freedom UI to the Classic UI.

 


 

Like 0

Like

2 comments

It's likely that the package you have set as the Current Package is higher up in the dependencies than a package that has the Freedom UI option checked, so it's taking precedence over yours. 

Check to see if there is a package that contains MobileApplicationManifestDefaultWorkplace that is lower down in the dependency list, possibly one in Custom. That is likely what is causing yours to not work.

Ryan

Ryan Farley,

Thanks for the Suggestion, I am able to switch to Classic UI now

Show all comments

Hi all.
I've been doing LDAP integration setup (which is start "Run LDAP import" Process) in creatio.

For Local (Onsite) environment has ben success import data from LDAP but for the cloud environment always error with message:

System.Exception: LDAP import error: 22021: invalid byte sequence for encoding "UTF8": 0x00.
  at Terrasoft.Core.Process.RunLDAPImport.InsertLDAPElementsScriptTaskExecute(ProcessExecutingContext context)
  at Terrasoft.Core.Process.ProcessFlowElement.CallInternalExecute(ProcessExecutingContext context)
  at Terrasoft.Core.Process.ProcessFlowElement.ExecuteItem(ProcessExecutingContext context)
  at Terrasoft.Core.Process.ProcessFlowElement.Execute(ProcessExecutingContext context)

anybody know the problem and how to solve it?

Like 0

Like

2 comments
Best reply

Hello,

The issue you have reported happens because you are trying to use the format of the values, which isn't supported in PostgreSQL. In order to fix the issue, you should exclude system groups with pre-Windows 2000 support from the synchronization. 
To resolve this issue, please change the group filter to the following:
(&(objectClass=group)(!userAccountControl:1.2.840.113556.1.4.803:=2)(!isCriticalSystemObject=TRUE))


Best regards
Ivan

Hello,

The issue you have reported happens because you are trying to use the format of the values, which isn't supported in PostgreSQL. In order to fix the issue, you should exclude system groups with pre-Windows 2000 support from the synchronization. 
To resolve this issue, please change the group filter to the following:
(&(objectClass=group)(!userAccountControl:1.2.840.113556.1.4.803:=2)(!isCriticalSystemObject=TRUE))


Best regards
Ivan

Ivan Savenko,

Thanks, its worked

Show all comments

Hi Community,

 

I have three objects: Contact, Accounts details, AccountContact. Contacts has contact details unique on email address. Contact and Accounts details have many to many mapping with AccountContact being the mapping table. We have created lookups in accountcontact table on contact and accounts to get the mapping. Now we want to show all the accounts in Accounts details for a contact in an expanded list on the contact form page. How do we reach from contact object to accounts via accountcontact object? Screenshot of the properties of expanded list attached

Like 0

Like

1 comments

Hi,

Unfortunately, I didn't fully understand your task. Could you please provide a schematic representation of the table relationships and the data you want to display on which page?

Show all comments

Hello. One of our recent emails had quite a few "delivery errors". When I went in to look more closely, the Reason Details says "Reason details: Sending failed and all attempts to resend failed" 



While it's clear the sending failed, there's no detailed context as to why it failed (i.e. Invalid email, unsubscribed, etc). Please advise on how to gather more concrete and detailed data. Thanks.

 

Like 0

Like

1 comments

Hi Team,

When creating a new custom UserTask, I notice that certain field types like 'Unlimited length text' and 'Localizable String' are available in existing UserTasks but are missing in my custom UserTask.I would greatly appreciate any assistance with this. Thank you in advance.

Regards,
Mahalaxmi.G

Like 0

Like

2 comments

Dear Mahalaxmi,
 

Thank you for reaching out regarding the missing parameter types in your custom UserTask.
 

The “Unlimited length text” and “Localizable String” parameter types, which you noticed in existing UserTasks, were removed starting from version 7.17.0. 

These parameter types are still present in UserTasks created in previous versions for backward compatibility, but they are no longer available when creating new UserTasks in the latest versions.
 

I understand how this might be unexpected, and I appreciate your understanding.
 

Best regards,
Andrii

Show all comments

Hello,

I need the record registry on the sidebar page to automatically refresh when the page is opened. I'm trying to use crt.HandleSidebarOpenRequest (version 8.1.4). Here is my code:
 

   handlers: /**SCHEMA_HANDLERS*/[
   {
   request: "crt.HandleSidebarOpenRequest",
   handler: async (request, next) => {
   console.log("Обробник викликано");
   const result = await next?.handle(request);
   console.log("Після next.handle(request)");
   const handlerChain = sdk.HandlerChainService.instance;
   // Оновлюємо дані при відкритті сторінки
 
   await handlerChain.process({
       type: "crt.LoadDataRequest",
       $context: request.$context,
       params: {
           config: {
               loadType: "reload",
               useLastLoadParameters: true
           },
           dataSourceName: "DataGrid_69bg53fDS"
       }
   });
   console.log("вуцауца");
   return result;
}
   }

         

       ]/**SCHEMA_HANDLERS*/,

 

However, the handler is not triggering. Could you please help?

Like 0

Like

1 comments

Hello,

A developer can subscribe to sidebar open/close events in a remote module.

To subscribe to the open or close sidebar events in your code, follow these steps:

1. Create an Angular class in the project. To do this, run the ng g class my-sidebar-open.handler command at the command line terminal. Files of the MySidebarOpenHandler class will be added to the src/app/ project directory.

2. Implement the handler.

a. Open the my-sidebar-open.handler.ts file.

b.Define the class of request that inherits base type and contains sidebarCode property.

c. Inherit the BaseRequestHandler class with the new type (2.b.) from the @creatio-devkit/common library.

d. Specify the type of the handler.

e. Specify the type of the request as crt.HandleSidebarOpenRequest.

f. Implement the handle method with some custom logic.

    i. Since this handler will handle HandleSidebarOpenRequest requests from all sidebars, you should check the code of the sidebar before performing any custom actions.

    ii. Write your custom logic.

    iii. Call this.next?.handle(request) in order to process all other handlers of this request.

g. Save the file.

import { BaseRequestHandler } from "@creatio-devkit/common";
class SidebarEventRequest extends BaseRequest {
	public readonly sidebarCode!: string;
}
@CrtRequestHandler({
	type: `usr.MySidebarOpenHandler`,
	requestType: 'crt.HandleSidebarOpenRequest',
})
export class MySidebarOpenHandler extends BaseRequestHandler&lt;SidebarEventRequest&gt; {
	public async handle(request: SidebarEventRequest): Promise&lt;void&gt; {
		if (request.sidebarCode === 'UsrMyCustomSidebar') {
			//WRITE YOUR OWN LOGIC HERE
		}        
		await this.next?.handle(request);
	}
}

3. Build the project. To do this, run the npm run build command at the command line terminal.

Show all comments