Hello Community,

While working with the loader using <strong>sdk.MaskService</strong>, I'm trying to figure out how to display a custom message during the mask operation.

Here's the code I'm using:

let mask = new sdk.MaskService();
mask.showBodyMask();

// Code here

mask.hideBodyMask();
 

1. How can I display a custom message (e.g., "Loading Data, Please Wait...") while the mask is active?

2. Also, how can I apply the mask to a specific container?

Looking forward to your suggestions.

Regards,
Ajay K

 

Like 0

Like

2 comments
Best reply

The Freedom UI/new shell mask does not currently support displaying a message. Optionally, you could display a toast message in addition to showing the mask.

It only supports blocking the entire app/shell, not for specific containers only.

The Freedom UI/new shell mask does not currently support displaying a message. Optionally, you could display a toast message in addition to showing the mask.

It only supports blocking the entire app/shell, not for specific containers only.

Ryan Farley,

Thank you for the information.

Show all comments

Dear,

On the Classic UI we could have a thumbnail of the images in the browser:

Classic UI

But in Freedom the picto is not display:

Freedom UI


Is it possible to display the image thumbnail directly in the browser with Freedom UI?

Thank you !
Nicolas

Like 0

Like

2 comments

Hello,

Unfortunately, currently this is not possible with the out-of-the-box solution. 
If you want to display a certain image for the record, for example company logo for the account record, you can use an Image component.


You can also consider using the following marketplace solution: https://marketplace.creatio.com/app/banza-files-extended-creatio?check_…

I hope this helps! If you have any further questions or need assistance, feel free to reach out.

I have a marketplace addon coming that does this, it is still awaiting the approval for the marketplace to publish the addon - it takes a very long time for them to approve things 👎🏻 - hopefully it will be published soon. 

Show all comments

Hello Community,

Is there any way to bind the images for the articles we create in the Knowledge base, to the deployable pacakge?

Thank you

Sasor

Like 2

Like

1 comments
Best reply

Hello Sasor, 

If we're talking about Data Binding, when transferring the KnowledgeBase, it's likely necessary to also transfer the KnowledgeBaseFile, since the article references attached files in order to display them properly.

 

Hello Sasor, 

If we're talking about Data Binding, when transferring the KnowledgeBase, it's likely necessary to also transfer the KnowledgeBaseFile, since the article references attached files in order to display them properly.

 

Show all comments

Hi Creatio Community,

I need to trigger a business process (BP) whenever a new record is inserted into the Webhook object through a webhook.

I’m using the Entity Event Layer and listening to the OnInserted event for the Webhook object. How can I trigger the  BP from the entity event code when a new record is added?

I’ve tried using ProcessExecutor and ProcessManager, but encountered access issues. Any help or example code would be greatly appreciated!

Thanks!

Like 0

Like

2 comments

If all you need to do is start a process, you can just create a process with a signal start on Record Added in the Webhook table. See https://academy.creatio.com/docs/8.x/no-code-customization/bpm-tools/process-elements-reference/events/signal-start-event

Ryan

Show all comments

Hi Everyone! 

I have a use case where I need to make adding a record to a detail on the Opportunity page mandatory for a specific stage in Opportunity DCM. 

Would anyone know how to implement it? 
Are there any differences between Classic and FUI? 
Can it be done through Validation? 

Any suggestions welcome!

Thanks so much for your help!
Jacek

Like 0

Like

3 comments

Hello Jacek,

In order to implement your logic you will have to create the user task for adding a record to the detail and set it as required step in DCM.

Opportunity management 

Yeah, this is something a missing for which it's quite useful to have to behave like a mandatory field, rather than a task to fill in. 

Have not found a way other than to add task, but we did it in a business process so that it will first check if detail has some records or not. 

Use cases : Address filled in ; Products added to opp.. there's probably more. 

Our sales team are not big fans of extra tasks to validate in addition to the data to fill in.

Unfortunately, it is not possible to make some detail mandatory for filling in with user.  We registered this request and forwarded to our R&D team for consideration and implementation in future application releases.

It is possible to do with development though. 

Here is a sample algorithm for how it may be done in Classic UI. Please not that the methods in the examples serve only for giving an idea of how this may be done and don't perform actual business task: 

1) Create an ESQ to check if the detail has records added.

Example: 

checkDetailRecords: function() {
	var accountId = this.get("Id");
	var select = this.Ext.create("Terrasoft.EntitySchemaQuery", {
		rootSchemaName: "AccountAddress" //name of the detail object schema
	});
	var esqFilter = select.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "Account", accountId);
	select.getEntityCollection(function(response) {
		if (response.success) {
			var collection = result.collection;
			if (collection &amp;&amp; collection.collection.length &gt; 0) {
				this.set("DetailHasRecords", true);
				this.set("ESQCompleted", true);
				this.save();
			} else {
				this.set("DetailHasRecords", false);
				this.set("ESQCompleted", true);
				this.save();
			}
		}
	}, this);
}

2) After checking if there are any records you would need to save the result, for example, to an attribute: 

Example: 

attributes: {
	"DetailHasRecords": {
		"type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
		"dataValueType": Terrasoft.DataValueType.BOOLEAN,
		"value": false
	},
	"ESQCompleted": {
		"type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
		"dataValueType": Terrasoft.DataValueType.BOOLEAN,
		"value": false
	},
}

3) After that you can override save method for the opportunity to check if the detail is filled in when the opportunity in a specific stage  

Example: 

save: function() {
	if("ESQCompleted") {
		if("DetailHasRecords") {
			this.callParent();
		} else {
			this.showInformationDialog("Please fill in ....");
		}
	} else {
		this.checkDetailRecords();
	}
}

 

Also to prevent the opportunity when record was deleted from the detail and no records in the detail left you can use the method onDetailChanged: 

onDetailChanged: function(detail) {
	this.callParent(arguments);
	if (detail.schemaName === "AccountAddress")//name of the detail
		this.checkDetailRecords();
	}
}
Show all comments

Dear,

When starting Creatio we have the following errors :

Classic UI

It seems that Creatio is not finding some language files.

Can these mistakes be corrected ?

Thank you !
Nicolas

Like 0

Like

1 comments

Hello!

Try to change the language of the user to English, recompile the system. Then switch back to French and try to reproduce the error.

Have a nice day!

Show all comments

Hi Community,

I'm trying to identify the ObjectName (schema name) and the RecordId of a form page that is currently open in Creatio (Freedom UI), using the context data available (as shown in the attachment). Is there a recommended way to retrieve this information through code or the browser console?

What’s the best way to access this data from within the button click handler?

Reference Screenshot

Thanks in advance!

Ajay K

Like 1

Like

1 comments

This is possible, but only from the context of the page itself. I am not sure if it's possible from a sidebar to know anything about the current page loaded elsewhere, maybe with a request handler in a remote module where you can specify the scopes?

As for getting this info within the context of the page, to get the primary data source, you can use: 

const pds = await request.$context.getPrimaryModelName();

With the data source name, you can get the schema for the datasource which will give you the entity/object name, the Id column attribute, and also the primary display value attribute using the following (note, this gets the attribute names, not the values): 

const pds = await request.$context.getPrimaryModelName();
const schema = await request.$context.dataSchemas[pds];
 
const entityName = await schema.name;
const idColumn = await schema.primaryAttributeName;
const nameColumn = await schema.primaryDisplayAttributeName;

Now that you have the attribute names, you can get the values: 

const idValue = await request.$context[idColumn];
const nameValue = await request.$context[nameColumn];
// etc

This sort of thing works great if you have a custom base page type that could be used for many different pages/objects. 

Also, as a FYI, not sure how this is going to change after 8.2.3 since 8.2.3 has a beta feature (not enabled out of the box) that allows a page to have multiple connected data sources. That might break some of this.

Ryan

Show all comments

Hey Team , i have a user task in the lead section and inorder to move from one stage to another ( custom stages) , i have put up a user based task. However when the user clicks on complete , the system throws the below error 

I have not written this view.On multiple compilations , i still seem to face this issue.
Please note that this issue is occuring in my local , and when the same code is pulled by others to their local , this seems to work.

Like 0

Like

1 comments

Hello!

Could you please provide some details about the transfer of stages, especially the part related to user tasks?

Show all comments

Hello mates !

I'm trying to create a script into a business process to check the SIRET (French Enterprise Number). But I'm having a basic problem: an identifier is expected when I try to compile on line 59

using System.Text.RegularExpressions;
 
string siretNumber = Get<String>("siret");
bool siretValide = Get<bool>("siretValide");
 
int ttlAddition = 0, cpt = 1;
 
string formatInput = Regex.Replace(siretNumber, "[^a-zA-Z0-9_]+", "", RegexOptions.Compiled);
string reverseCard = new string(formatInput.ToCharArray().Reverse().ToArray());
 
int[] arrDigits = Array.ConvertAll<string, int>(
    System.Text.RegularExpressions.Regex.Split(reverseCard.ToString(), @"(?!^)(?!$)"),
    str => int.Parse(str)
);
int[] arrMult = new int[arrDigits.Length];
 
// First Luhn step:
// Start with the last digit (on the right)
// and move to the left, doubling the value of all even-numbered digits
for (int i = 0; i < arrDigits.Length; i++)
{
    if (cpt == 1)
        arrMult[i] = arrDigits[i]; // the key is processed first, the number is not doubled 
    else
    {
        if (cpt % 2 == 0)
            arrMult[i] = 2 * arrDigits[i];
        else
            arrMult[i] = arrDigits[i];
    }
    cpt++;
}
 
// Add together all the digits of each number thus obtained.
// If digit > 10, then the digit to be added gives, for example: 18 = 1 + 8
for (int i = 0; i < arrMult.Length; i++)
{
    if ((int)arrMult[i] >= 10) // if number > 9 you have to break down the number, e.g. 18 gives: 1+8
    {
        int[] intList = Array.ConvertAll<string, int>(
            System.Text.RegularExpressions.Regex.Split(arrMult[i].ToString(), @"(?!^)(?!$)"),
            str => int.Parse(str)
        );
        for (int j = 0; j < intList.Count(); j++)
        {
            ttlAddition += (int)intList[j];
        }
    }
    else
        ttlAddition += (int)arrMult[i];
}
 
// if modulo by 10 of the addition is zero then our figure is valid 
if (ttlAddition % 10 == 0)
    Set<bool>("siretValide", true); // set the variable siretValide to true in Creatio 
else
    Set<bool>("siretValide", false);

Compilation error

In VS Code, by replacing the last lines: Set<bool>("siret Valide", true); with Console.WriteLine("Verification OK"); and Set<bool>("siret Valide", false); with Console.WriteLine("Verification KO"); the program works fine.

 

Like 0

Like

4 comments
Best reply

Hello,

 

You can add using statement in Usings section in Methods block Of BP like this:

Also here is the fixed example of your code without compilation errors:

 

string siretNumber = Get&lt;String&gt;("siret");
bool siretValide = Get&lt;bool&gt;("siretValide");
 
int ttlAddition = 0, cpt = 1;
 
string formatInput = Regex.Replace(siretNumber, "[^a-zA-Z0-9_]+", "", RegexOptions.Compiled);
var formatInputCharArray = formatInput.ToCharArray();
Array.Reverse(formatInputCharArray);
string reverseCard = new string(formatInputCharArray);
 
int[] arrDigits = Array.ConvertAll&lt;string, int&gt;(
   System.Text.RegularExpressions.Regex.Split(reverseCard.ToString(), @"(?!^)(?!$)"),
   str =&gt; int.Parse(str)
);
int[] arrMult = new int[arrDigits.Length];
 
// First Luhn step:
// Start with the last digit (on the right)
// and move to the left, doubling the value of all even-numbered digits
for (int i = 0; i &lt; arrDigits.Length; i++)
{
	if (cpt == 1)
		arrMult[i] = arrDigits[i]; // the key is processed first, the number is not doubled 
	else
	{
		if (cpt % 2 == 0)
			arrMult[i] = 2 * arrDigits[i];
		else
			arrMult[i] = arrDigits[i];
	}
	cpt++;
}
 
// Add together all the digits of each number thus obtained.
// If digit &gt; 10, then the digit to be added gives, for example: 18 = 1 + 8
for (int i = 0; i &lt; arrMult.Length; i++)
{
	if ((int)arrMult[i] &gt;= 10) // if number &gt; 9 you have to break down the number, e.g. 18 gives: 1+8
	{
		int[] intList = Array.ConvertAll&lt;string, int&gt;(
           System.Text.RegularExpressions.Regex.Split(arrMult[i].ToString(), @"(?!^)(?!$)"),
           str =&gt; int.Parse(str)
       );
		for (int j = 0; j &lt; intList.Length; j++)
		{
			ttlAddition += (int)intList[j];
		}
	}
	else
		ttlAddition += (int)arrMult[i];
}
 
// if modulo by 10 of the addition is zero then our figure is valid 
if (ttlAddition % 10 == 0)
	Set&lt;bool&gt;("siretValide", true); // set the variable siretValide to true in Creatio 
else
	Set&lt;bool&gt;("siretValide", false);
return true;

Also please make sure that "siret" and "siretValide" parameters have the values assigned before this Script Task is executed. 

 

Hello

In a task script, you're not allowed to add the using statements.
Also, the script must end with:
return true;

You can add the using statements at the Methods block in the BP.

Hope this helps!

Mohamed Ouederni,

Hello Mohamed,
Thank you for your help ! i m a newbie in C#.

So i followed your recommandations:

i removed the using System.Text.RegularExpressions; at the script beginning, because when i open the process source code there is allready a using System.Text

i added a return true at the end of the script.

and i added too System.Text.RegularExpressions on the formatInput string :

string formatInput = System.Text.RegularExpressions.Regex.Replace(siretNumber, "[^a-zA-Z0-9_]+", "", System.Text.RegularExpressions.RegexOptions.Compiled);

But now i have the following errors:
compilation error

Line 65 is :
string reverseCard = new string(formatInput.ToCharArray().Reverse().ToArray());
 

Hello,

 

You can add using statement in Usings section in Methods block Of BP like this:

Also here is the fixed example of your code without compilation errors:

 

string siretNumber = Get&lt;String&gt;("siret");
bool siretValide = Get&lt;bool&gt;("siretValide");
 
int ttlAddition = 0, cpt = 1;
 
string formatInput = Regex.Replace(siretNumber, "[^a-zA-Z0-9_]+", "", RegexOptions.Compiled);
var formatInputCharArray = formatInput.ToCharArray();
Array.Reverse(formatInputCharArray);
string reverseCard = new string(formatInputCharArray);
 
int[] arrDigits = Array.ConvertAll&lt;string, int&gt;(
   System.Text.RegularExpressions.Regex.Split(reverseCard.ToString(), @"(?!^)(?!$)"),
   str =&gt; int.Parse(str)
);
int[] arrMult = new int[arrDigits.Length];
 
// First Luhn step:
// Start with the last digit (on the right)
// and move to the left, doubling the value of all even-numbered digits
for (int i = 0; i &lt; arrDigits.Length; i++)
{
	if (cpt == 1)
		arrMult[i] = arrDigits[i]; // the key is processed first, the number is not doubled 
	else
	{
		if (cpt % 2 == 0)
			arrMult[i] = 2 * arrDigits[i];
		else
			arrMult[i] = arrDigits[i];
	}
	cpt++;
}
 
// Add together all the digits of each number thus obtained.
// If digit &gt; 10, then the digit to be added gives, for example: 18 = 1 + 8
for (int i = 0; i &lt; arrMult.Length; i++)
{
	if ((int)arrMult[i] &gt;= 10) // if number &gt; 9 you have to break down the number, e.g. 18 gives: 1+8
	{
		int[] intList = Array.ConvertAll&lt;string, int&gt;(
           System.Text.RegularExpressions.Regex.Split(arrMult[i].ToString(), @"(?!^)(?!$)"),
           str =&gt; int.Parse(str)
       );
		for (int j = 0; j &lt; intList.Length; j++)
		{
			ttlAddition += (int)intList[j];
		}
	}
	else
		ttlAddition += (int)arrMult[i];
}
 
// if modulo by 10 of the addition is zero then our figure is valid 
if (ttlAddition % 10 == 0)
	Set&lt;bool&gt;("siretValide", true); // set the variable siretValide to true in Creatio 
else
	Set&lt;bool&gt;("siretValide", false);
return true;

Also please make sure that "siret" and "siretValide" parameters have the values assigned before this Script Task is executed. 

 

Hello Iryna !
This fixed the two first errors.

compilation error

it looks like system can not find Count, so i added System.link to the method block of the BP and the process has been successfully compiled.

Thank you all for you help !

Show all comments

Hello Community,

I need to store a snippet of HTML code (e.g., a button or formatted content) into a field of an object (e.g., a text or string field). Later, I want to render this HTML dynamically on a page at runtime.

What’s the best way to store the HTML safely and then render it so that it's interpreted as actual HTML (not plain text) in the UI?
Are there any security or encoding considerations I should keep in mind?

Thanks in advance!

Like 2

Like

6 comments
Best reply

An easy no code way would be to bind the value to a read-only Rich Text control on the page. It will display the HTML as HTML.

Otherwise, you'd have to create your own custom control for it.

An easy no code way would be to bind the value to a read-only Rich Text control on the page. It will display the HTML as HTML.

Otherwise, you'd have to create your own custom control for it.

Ryan Farley,

Thanks for the suggestion! I am looking for custom control.

Is there any reference or example available to create custom control.

Hello Ajay,

Here is the article that contains the explanation and example of how to create custom control

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/8.1/front-end-development/classic-ui/controls/examples/add-a-control-to-a-record-page

Also inside your custom control implementation you can add HTML value validation and remove any script elements to provide the level of security. 

Hi Iryna,

 

Is above link, you provided, applied for Freedom UI module?

The information and example for Freedom UI you can find here:

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…

This simple example of an IFRAME control could easily be adapted to simple output a div containing the custom HTML instead, plus you'd just bind the column containing the HTML to the control. https://customerfx.com/article/embedding-an-iframe-on-a-creatio-freedom-ui-page/

A full component would likely be a better route, but this simpler option coudl still get the job done.

Ryan

Show all comments