Hi Team,

 

I need to create a custom component like 'input-field with button' (img 1). On clicking the button, a modal will be shown, user can select multiple or all option & selected values will be displayed in input field.

 

On Clicking 'Select Owner' button, a modal is opened to select records to show in 'Multi-Owner' field. (img 2)

 

For now, Above functionality is done through the code. For this I referred article

Invoking a Multi-Select Lookup Dialog on a Creatio Freedom UI Page | Customer FX

But I want to create a custom component that reside in 'component' or 'widget' of Page-Designer (Left hand side). So that we can use that component using drag-drop approach like any other tool such as Button, Bar etc.


 


Platofrm: Creatio:Energy (Freedom UI)

Like 0

Like

6 comments

This would be nice to be able to do in this way, but I think currently the only way is to build a custom Angular component by following this documentation: https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/front-end-development/freedom-ui/remote-module/implement-a-remote-module/overview

 

Or you can create a Classic UI component (Ext.js) and add that to a Freedom UI page via the page code, as seen in this documentation: https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/front-end-development/freedom-ui/remote-module/implement-a-custom-component/overview 

 

I haven't done either of these before, as they seem quite involved for the benefits (you would need fairly consistent use cases I expect for it to be reusable without significant development) but those are the only options currently that I know of.

Hi Harvey,

Can we implement the above functionality on cloud instance, or is it only possible on a local instance?

The information by Harvey is the way to do this - you can create a custom component for both local and cloud systems. You can see a walk through creating a custom component using Clio/Clio explorer here: https://www.youtube.com/watch?v=CE5uETqTsyQ&list=PLnolcTT5TeE2BMFf_XmJrSwpnbcLCLJkb&index=1

However, just to point out, there is now a multiselect component that is available in 8.2.1 and higher that might fit your needs. See https://customerfx.com/article/using-the-new-multiselect-control-in-creatio-8-2-1-and-higher/

Ryan

An important thing to mention is that seemingly (there was a community article I can't find anymore) there is currently no way to add a properties page to your custom component, which makes the whole use case of "a dev creates components and a no-code-creator uses and configures them" obsolete...

Robert Pordes,


That’s frustrating, so the only way you’d be able to configure the custom component would be through the page code then? What do you see in the properties panel in Page Designer for the custom component as it stands?

This is true, for custom components, you see this in the properties pane: 

To set any properties of the custom component, you have to edit the code to add the properties there. This might be the thread Robert was thinking of: https://community.creatio.com/questions/there-any-way-create-ui-custom-…

Ryan

Show all comments

Hi Community,

 

Our customer has requested a bar code scanner inside Creatio, so they can scan products and check its information.

We have multiple ways of doing this:

 

  1. WebApp (Custom Component) that opens the smartphone camera;
  2. WebApp (Custom Component) that establishes a connection to a scanner device (for example a Zebra Scanner);
  3. Bar code scanner in the mobile app, which we will be able to configure as described here https://academy.creatio.com/docs/8.x/resources/release-notes/8-2-1-energy-release-notes#title-2782-13.

     

For our use case, we will be using the first option, since option three is not available at the moment.

 

After some digging, we discovered that there are multiple libraries that could help us implement this use case. However, we decided to post this question to know if someone has already implemented something similar, or at least tried to. So, we can share the know-how behind it.

 

Thank you.

Like 3

Like

4 comments

Have not tried, also looking forward to some knowhow. Not just to scan, but also to generate for event registrations for example. 

I have integrated a barcode scanner with Creatio. We've used a simple bluetooth barcode scanner connected to the device (in our case it was a tablet with full Creatio open in the browser). Most barcode scanners work just like a connected keyboard. When a barcode is scanned it sends the "text" value of the barcode to as input, just as if it were typed in. In my solution, we had a page that opened and we set focus to a text/input field on the page and dislayed some message about "waiting for barcode" for the user. Then, once scanned, the text value of the barcode scanned triggered a change event for the text/input field and we then did the action needed for the barcode (which in our case the barcode was a vehicle VIN, so we then used an API to get the vehicle details for the scanned VIN). All really simple to be honest. Using this approach, thinking of the barcode scanner as text entered by an input device, just like a keyboard, it all turned out to be really easy to work with.
Hope this helps.

Ryan.

Hey Community, 
Found this on the Creatio page 

Has anyone attempted to identify the exact code or reference methods that enable this feature? We're looking to leverage this capability for a client and are trying to figure it out.

Ryan Farley,

Hello, Looks like the barcode scan functionality has been released for Mobile version 8.2.4. Here is what Creatio sent us. Did anyone from community get a chance to try this?

BarcodeScanService is a service used to initiate the barcode scanner and retrieve the scan result using scan() method. Supported barcode types:

  • Aztec: ISO/IEC 24778 — 2D matrix barcode, compact, high data capacity, no quiet zone needed.
  • Code 39: ISO/IEC 16388 — Variable-length, alphanumeric, widely used in logistics and inventory.
  • Code 93: ISO/IEC 15417 — Higher density and reliability version of Code 39, supports more characters.
  • EAN: ISO/IEC 15420 — 1D barcode for retail products, encodes 12-13 digits, globally standardized.
  • Code 128: ISO/IEC 15417 — High-density 1D barcode, supports ASCII 128, used in shipping and logistics.
  • Data Matrix: ISO/IEC 16022 — 2D barcode, supports large data storage, error correction included.
  • QR: ISO/IEC 18004 — 2D matrix code, fast scanning, supports URLs, text, and more, error correction built-in.
  • ITF (Interleaved 2 of 5): ISO/IEC 16390 — Numeric-only, compact, used for cartons and packaging.
  • UPCE: ISO/IEC 15420 — Compressed version of UPC, for small products, 6-digit format.
  • PDF417: ISO/IEC 15438 — 2D stacked linear barcode, supports large data, used in documents and IDs.


 

Return data

type - Indicates the result type: barcode, error, or cancelled.

rawContent - The scanned barcode content; null if the scan is canceled or an error occurs.

errorMessage - Describes the error if an error occurs; null otherwise.

format - Specifies the barcode format (one of the supported types or unknown); null in case of an error.

Usage:

@CrtRequest({

    type: 'crt.TestBarcodeScanRequest',

})

export class TestBarcodeScanRequest extends BaseRequest { }

@CrtRequestHandler({

    requestType: 'crt.TestBarcodeScanRequest',

    type: 'usr.TestBarcodeScanRequest',

    scopes: ['MobileContact_ListPage']

})

export class TestCaseScanBarcodeRequestHandler extends BaseRequestHandler<TestBarcodeScanRequest> {

    public async handle(request: BaseRequest): Promise<unknown> {

        const res: BarcodeScanResult = await new BarcodeScanService().scan();

        Logger.console('___ Result type: ' + res.type);

        Logger.console('___ Content: ' + res.rawContent);

        Logger.console('___ Error: ' + res.errorMessage);

        Logger.console('___ Scanned code format: ' + res.format);

        return res;

    }

}

Show all comments

Hi

I am trying to follow the example of building a custom components using remote module from this page: 

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/front-end-development/freedom-ui/remote-module/implement-a-remote-module/overview

But when I reach the part of building the project on VS code using "npm run build" I always get the following error:

 

Generating browser application bundles (phase: setup)...C:\Users\Lenovo\Downloads\example4\node_modules\webpack\lib\container\ModuleFederationPlugin.js:58
                       throw new TypeError(
                             ^
TypeError: The 'compilation' argument must be an instance of Compilation
   at ModuleFederationPlugin.getCompilationHooks (C:\Users\Lenovo\Downloads\example4\node_modules\webpack\lib\container\ModuleFederationPlugin.js:58:10)
   at C:\Users\Lenovo\Downloads\example4\node_modules\webpack\lib\container\HoistContainerReferencesPlugin.js:36:33
   at Hook.eval [as call] (eval at create (C:\Users\Lenovo\Downloads\example4\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:88:1)
   at Hook.CALL_DELEGATE [as _call] (C:\Users\Lenovo\Downloads\example4\node_modules\tapable\lib\Hook.js:14:14)
   at Compiler.newCompilation (C:\Users\Lenovo\Downloads\example4\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compiler.js:1121:30)
   at C:\Users\Lenovo\Downloads\example4\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compiler.js:1166:29
   at eval (eval at create (C:\Users\Lenovo\Downloads\example4\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:31:1)

   

Any help for this?

Like 0

Like

1 comments

Hello,
I do not believe this issue has something to do with the article you provided or the Creatio system. Try to look for this error in other sources for example here.

Show all comments

Hi, folks. By default, custom angular components have no setting UI panel, as on screen. I haven't found any info in docs, so maybe here somebody knows how to add user-friendly way to set up component?

Like 0

Like

2 comments

Hello,
​​​​​​​
Unfortunately, for now, the system does not support such no-code option. However, already informed our developers about this option, and they will work on this feature in future versions. 

Thank you for helping us improve the system!


Best regards,
Ivan

Ivan Savenko,

ok, thx. Maybe there is some way to detect when page opened in configuration mode?

Show all comments

Hi,

I'm developing my own custom Angular component for Creatio. I would like to use some of the standard components within it, such as a lookup field. How can I achieve this?

Is it possible to create a custom component that acts as a container for other elements, similar to crt.FlexContainer, which defines an items property for child components?

 

Like 1

Like

1 comments

Hello Eryk,

Unfortunately, it's impossible to reuse components in custom angular components for now, but Creatio plans to add such functionality in future releases.

Show all comments

Hi,



I have been working on adding new custom components using the new freedom UI following the below Creatio article.

https://academy.creatio.com/docs/developer/front_end_development_freedom_ui/remote_module/implement_a_remote_module/overview



After doing some additional research I was able to add some custom components successfully. But I'm kind of stuck on where I need to pass the data from Creatio's side to that specific angular component. Please refer to the below screenshots of my code snippets and if anyone has any idea on what I'm missing can you guide me or provide some resources to get more idea on this?

 

Below is the "card.component.html" file:

<mat-card class="card-class" *ngFor="let val of valuelist" >
    <mat-card-header></mat-card-header>
    <mat-card-content class="content-wrapper">
        <div fxFill fxLayout="row">
            <div fxFlex="30" fxLayout="space-around center">
                <div fxFlex fxLayoutAlign>
                    <img mat-card-sm-image src="https://material.angular.io/assets/img/examples/shiba2.jpg" alt="Free Image" class="responsive-image"  >
                </div>
                <div fxFlex fxLayoutAlign>
                    <img mat-card-sm-image src="https://material.angular.io/assets/img/examples/shiba2.jpg" alt="Free Image" class="responsive-image" >
                </div>
            </div>
            <div fxFlex="55" fxLayout="column" fxLayoutAlign="center start" class="contentN" >
                <mat-card-title>{{val}}</mat-card-title>
                <mat-card-subtitle>{{val}}</mat-card-subtitle>
            </div>
            <div fxFlex="15" fxLayout fxLayoutAlign="center center" class="contentP">
                <img mat-card-sm-image src="https://material.angular.io/assets/img/examples/shiba2.jpg" alt="Free Image" class="responsive-image" >
            </div>
        </div>
    </mat-card-content>
    <mat-card-footer></mat-card-footer>
</mat-card>

 As in the above, from using ngFor I'm adding cards based on the data which are coming from the "valuelist". Below is the example of the "card.component.ts" file:



 

import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';
import { CrtInput, CrtOutput,CrtInterfaceDesignerItem, CrtViewElement } from '@creatio-devkit/common';
 
 
@Component({
  selector: 'mlcgd-card',
  templateUrl: './card.component.html',
  styleUrls: ['./card.component.scss'],
  //encapsulation: ViewEncapsulation.ShadowDom
})
 
/* Add the CrtViewElement decorator to the Textpromt component. */
@CrtViewElement({
  selector: 'mlcgd-card',
  type: 'mlcgd.Card'
})
 
/* Add the CrtViewElement decorator to the InputComponent component. */
@CrtInterfaceDesignerItem({
  /* Manage the element layout in the library of the Freedom UI Designer. */
  toolbarConfig: {
    caption: 'Card View',
    name: 'CardView',
    /* The path to the component image. */
    icon: require('!!raw-loader?{esModule:false}!./icon.svg'),
    defaultPropertyValues: {
      label: 'Card View'
    }
  }
})
 
export class CardComponent {
 
  valuelist:string[] = [];
 
  constructor() {}
 
  @Input()
  @CrtInput()
  /* ...............The input value. */
  public value: string = 'Lakindu, Chinthana, Deshan';
 
  @Output()
  @CrtOutput()
  /* ................Track input value changes. */
  public valueChange = new EventEmitter<string>();
 
  ngOnInit(): void {
    this.valuelist = this.value.split(',')
  }
}

As you can see in the above code snippet I have a string called "value" and I have hardcoded 3 values for that. What I need to achieve is without hardcoding the data I need to get those data from the Creatio's end like from a field. So to do that I need to modify the code which is gonna add to the viewconfig array in the client schema. Please refer to the below Code snippet. And I need help with modifying it accordingly to pass the data from Creatio to the component.

 

{
				"operation": "insert",
				"name": "Card_hs3upn6",
				"values": {
					"type": "mlcgd.Card",
					"label": "Card View",
					"value": "$MLCGDName"
				},
				"parentName": "FlexContainer_08awxs2",
				"propertyName": "items",
				"index": 0
			}

Kind Regards,

Lakindu

Like 4

Like

5 comments

Hello,

You can find an example of working with the field value in these articles.

https://academy.creatio.com/docs/developer/front_end_development_freedo…

https://academy.creatio.com/docs/developer/front_end_development_freedo…

They described information on how to create a validator/converter for the value in a field.

Hello,



Thanks for sharing this but I'm afraid this might not be the one that I'm looking for. Anyways do you have anything related to dashboards? Like adding a new dashboard element using a remote module?



I was able to add some components there but for the moment I am kind of stuck at passing the data to the created component using the remote module.

Unfortunately, no, we don't have such examples.

To be honest, the remote module is quite a fresh feature, which means that currently, it doesn't have much logic. If possible, it would be better to use other methods to add your business logic.

Lakindu Yasomith,

Maybe this article can help you:

https://academy.creatio.com/docs/developer/front_end_development_freedo…

 

If not, please let us know. Maybe you can describe your case in more detail for support@creatio.com.

Lakindu Yasomith,

Hi,

 

I'm also working on a custom component and have the same issue.

Did you find a solution to this?

 

Br,

Robert

Show all comments