Hi community,

Is there any way how to modify only one record with help of "Modify" campaign's element?

For example, I've executed a campaign for event participants and want to change Response column if a participant clicked on a link in received email. But I want to change only a participant of the current event, not all. How can I arrange that?

Like 0

Like

0 comments
Show all comments

Hi community,

I have a lead form with an option of uploading of a file. How can I transfer the uploaded file to a Lead record (or record of another object) in Creatio with help of Creatio API? 

Like 0

Like

0 comments
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

i am trying to add a dropdown data by calling a webservice

does anyone have some advice?

 

Like 1

Like

0 comments
Show all comments

Hi all,

I want to install mapsly on creatio, but I want to know first, what version of creatio is compatible if you want to install mapsly?

i'm using creatio 8.2.2

Thanks

Like 0

Like

1 comments

Hello, 

Mapsly is compatible with 8.0.0 Creatio version and up. 

 

All the information regarding it's installation is included in Installation tab on CreatioMarketplace . Please follow this link: 

https://marketplace.creatio.com/app/mapsly

Show all comments

Hello,

I have some business processes that reads the files attached to a section using a "Process file" element to add them to a "send email" element.
If the "container" of the attachments is "an old one" (like CaseFile, AccountFile, etc.) it works fine.
If the "container" is the "Freedom UI SysFile" (Uploaded File) the "Process file" element always returns an empty collection of files (even removing all the filters).

How can I send an email from a Business Process and attach the files stored in "SysFile" entity?

Thanks

Like 0

Like

0 comments
Show all comments

How can I report on key words within a case (Either email or feed post) or which users have posted on a feed in a case?

Like 0

Like

0 comments
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

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

How to configure use freedom mini page for creating object and classic page for editing in classic ui section?

Like 0

Like

1 comments


Hello, 

 

Currently, this is the expected system behavior. If the modal/mini page for adding records is configured in Freedom UI, but you have Classic UI enabled, the mini-page will not open. Current mini pages (modal) only work for the shell and Freedom UI pages. However, we already have a task registered in our R&D team to consider and add support for modal/mini page details in Classic UI. 

 

 

Show all comments

i am using 8.2.2

i am trying to set the value of a number field called Lama Bekerja based on the months inputted in Mulai Bekerja accounting the year aswell, i know that using business rules where you can use set value = formula like so...

now when i open it, it doesn't let me do the calculations

can someone explain a method on how to implement this in creatio 8.2.2?

Like 1

Like

0 comments
Show all comments