Does anybody have fairly solid methods of working around Creatio's limitation of not being able to distinguish between zeroes and missing values for number fields? This often comes up in requirements, and I haven't found a workaround that works so well that I always use it.

 

Some methods we've tried/considered:

  • Using Text fields instead of number fields
    • Obvious disadvantage of not having numeric protections/validations, both in the page layer & the backend & database side
    • Values can't be aggregated into KPI widgets/graphs, unless you have some process to copy the number text into a hidden number field...
  • Having a Boolean field for every number field to indicate if it should be null or zero
    • Cumbersome to implement on objects with lots of number fields
    • Field still displays as a zero value unless you add in custom code everywhere it appears
    • BPs or Event Listener code needed to ensure these 2 fields agree, plus logic in the page/integrations needed to set the flags and make the field show nothing when the flag is set

 

Any other workarounds people are using that are effective? Hopefully Creatio will add this capability at some point as it is crucial for having valid data, but it feels like it would require a fairly big change to the platform, so I don't expect we'll get it very soon!

Like 0

Like

3 comments

Hello Harvey,

 

The task is still in progress and the only workaround that currently exists is using the text column instead of a number. In case this number should be processed it can be done using type casting in formulas (or script tasks) of business processes.

 

I've also added your voice to prioritize the problem for our R&D team. Hope this will be implemented soon.

We are also experiencing this issue when searching by dates. For example, 4/5/1967 will generate a hit, but not 04/05/1967.  Interested in being added to any prioritization tickets on this.

 

Anna Pannier,

 

Please create a separate question in the community with a description of how exactly the search is performed and which datatype your current column that stores the date has.

Show all comments

I have created a script to turn integers into words and it keeps compiling with errors.

 

heres the script:

 

using System;
using System.Text;
using Terrasoft.Core;
using Terrasoft.Core.Entities;
using Terrasoft.Core.Process;

public class ConvertCurrencyToTextTask : ProcessUserTask
{
   // ✅ Constructor
   public ConvertCurrencyToTextTask(ProcessExecutingContext context) : base(context) { }

   // ✅ Main execution method (Runs when the Script Task is triggered)
   public override bool CompleteExecuting(UserConnection userConnection)
   {
       try
       {
           // ✅ Retrieve the requested amount from the process parameter
           decimal requestedAmount = Get("DfcReqAmt");

           // ✅ Retrieve the dynamically fetched record ID
           Guid recordId = Get("Id");

           // ✅ Convert the numeric amount to words
           string convertedText = ConvertToWords(requestedAmount);

           // ✅ Store the result in the output parameter
           Set("DfcRequestedAmountText", convertedText);

           // ✅ Update the record in the FinApplication object
           UpdateRecord(userConnection, recordId, convertedText);
       }
       catch (Exception ex)
       {
           throw new Exception("Error in ConvertCurrencyToTextTask: " + ex.Message);
       }

       
   }

   // ✅ Converts numbers to words (DYNAMIC)
   private string ConvertToWords(long number)
   {
       if (number == 0)
           return "Zero";

       if (number < 0)
           return "Negative " + ConvertToWords(Math.Abs(number));

       string words = "";
       int thousandIndex = 0;

       while (number > 0)
       {
           if (number % 1000 != 0)
           {
               words = ConvertHundreds(number % 1000) + Thousands[thousandIndex] + " " + words;
           }
           number /= 1000;
           thousandIndex++;
       }

       return words.Trim();
   }

   // ✅ Converts hundreds, tens, and ones
   private string ConvertHundreds(long number)
   {
       string words = "";

       if (number >= 100)
       {
           words += Ones[number / 100] + " Hundred ";
           number %= 100;
       }

       if (number >= 10 && number <= 19)
       {
           words += Teens[number - 10] + " ";  // ✅ Corrected indexing for Teens
       }
       else
       {
           words += Tens[number / 10] + " ";
           words += Ones[number % 10] + " ";
       }

       return words.Trim();
   }

   // ✅ Updates the record with the converted text
   private void UpdateRecord(UserConnection userConnection, Guid recordId, string convertedText)
   {
       if (recordId == Guid.Empty) // ✅ Ensures ID is valid before updating
           throw new Exception("Record ID is empty, cannot update record.");

       var entitySchema = userConnection.EntitySchemaManager.GetInstanceByName("FinApplication");
       var entity = entitySchema.CreateEntity(userConnection);

       if (entity.FetchFromDB(recordId))
       {
           entity.SetColumnValue("DfcRequestedAmountText", convertedText);
           entity.Save();
       }
   }

   // ✅ Number arrays (DYNAMIC)
   private readonly string[] Ones = { "", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine" };
   private readonly string[] Teens = { "Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen" };
   private readonly string[] Tens = { "", "", "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety" };
   private readonly string[] Thousands = { "", "Thousand", "Million", "Billion", "Trillion" };
} // ✅ Class correctly closed

 

 

return true; // ✅ Ensures method completes properly
 

 

 

 

these are the errors I am getting:

 

DfcProcess_25a93f1.DfcLoans.cs    Identifier expected    CS1001    34
DfcProcess_25a93f1.DfcLoans.cs    Identifier expected    CS1001    33
DfcProcess_25a93f1.DfcLoans.cs    Identifier expected    CS1001    35
DfcProcess_25a93f1.DfcLoans.cs    Type or namespace definition, or end-of-file expected    CS1022    151
DfcProcess_25a93f1.DfcLoans.cs    } expected    CS1513    36
DfcProcess_25a93f1.DfcLoans.cs    Identifier expected    CS1001    32
DfcProcess_25a93f1.DfcLoans.cs    Identifier expected    CS1001    36

 

Not sure what is missing as far as syntax goes, all bracket appear to be in place.

 

Appreciate the help in advance.

 

 

 

 

Like 1

Like

4 comments

Hi,

 

The error is related to the business proceess DfcProcess_25a93f1. Can you share a source code for the business process, not the user task you shared? You can get the source code of the business process here:

There was no source code?

Hello,
 

In this case, do you perform development on a local environment?

If so, could you search for the schema in the {rootAppFolder}\Terrasoft.WebApp\Terrasoft.Configuration\Pkg\DfcLoans\Autogenerated\Src\DfcProcess_25a93f1.DfcLoans.cs directory?

You can also find the location of the file that causes compilation errors if you look at the application logs (Build.log) for the day of compilation and errors.

Show all comments

Hello,

 

I'm wanting to setup a business process so that when a user is mentioned in the feed they receive an email notification. Also, there may be instances where more than 1 user is mentioned in a single comment and I'd want each person to get an email notification in that case.

 

I've tried creating this business process and am stuck as it sends the notification to the person who created the comment in the feed, not the user mentioned in the comment. Any tips on this are greatly appreciated!

 

Thank you,

 

Eric

Like 0

Like

4 comments
Best reply

Hi Eric,

try to use such signal on the object 'User mention' and send notification to Contact:

Hi Eric,

try to use such signal on the object 'User mention' and send notification to Contact:

Thank you! That did it. What's the best method to provide a link to the record via an email? I tried following the steps here - https://community.creatio.com/questions/link-based-feed-notification but it appears to break when there are replies to an existing comment.

 

Eric Curran,

We have such formula (it is for Classic UI, but you can change it for Freedom UI):

"<a href=\""+[#System setting.Website URL#]+"/0/Nui/ViewModule.aspx#CardModuleV2/"+[#Page name#]+"/edit/"+[#Object Id#]+"\">"+[#Record title#]+"</a>"

Eric Curran,

We have implemented this way for replies:

Show all comments

Anyone ever encountered an 'Item with name "AnalyticsAccountUser" not found' error?

Like 0

Like

1 comments

Hello,

Could you please describe in more detail what actions you do before this error happens?

Show all comments

Hi, 

I have grouped a number of cases (Stages in my case) in the workflow. The decision of which stage will be chosen, is decided in a business process inside the previous stage.   

The problem is that the first stage of the group always shows, even if it will never be processed during the workflow. How can I hide this stage on a specific condition and show the other stage in the group.

Current workflow:

the grouped stages

 

Like 1

Like

0 comments
Show all comments

Hello Community,

In this article it is described on how to deal with selection windows crt.OpenSelectionWindowRequest. https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/8.1/platform-customization/freedom-ui/selection-window/overview

but no information at all about predefined values.

Is there any possibilty that when clicking 'NEW' there are some predefined default values?

Example

The Account type is set to 'Our Company'

Thank you,

Sasori

Like 0

Like

3 comments

Hello,
 

You don't need to use programming for this task.
You need to create an object replacement (in your example, an Account object replacement), in which you can set the default value for the corresponding columns, save the changes, and publish the object.

defValue
defValue


 After that, when you open the pages of creating records, you will see the fields immediately filled with the default values.

defValue in Runtime

These links can also be useful for you to find more options for achieving your goal:

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/development-tools/creatio-ide/configuration-elements/object

https://community.creatio.com/questions/it-possible-set-default-value-f…

Thank you.

Hello Serhii,

Thank you for the reply.

1) We can not utilize the generic default value, becasue depending on the conditions the Type, might have differnetvalues.

2) Our frontend logic is associated with OpenSelectionWindowRequest. In the documentation of OpenSelectionWindowRequest there is no documentation for default values.

Is there any workaround to achieve this?
Sasor

If you need to use a value based on one of the fields of an object, it is fashionable to use business rules at the object level, which, depending on the value in one field, will set the value for another field using the “Set values” option.

setValBusRul

setValBusRul
 

Show all comments

Hello!
I created a new Functional role with oData operations permission and add it to User. 
Using Postman can GET data from "Contact" collection with this User credentials. It also can create new Contact using POST method.
PATCH returns:  403 - Forbidden: Access is denied
DELETE returns:  405 - HTTP verb used to access this page is not allowed

What permissions I have to grant to this Functionsl role and how?

This instruction
https://academy.creatio.com/docs/developer/integrations_and_api/data_se…
say for 405
"The response should contain the Allow header with the list of request methods the resource supports."
Postman returns:
 405 - HTTP verb used to access this page is not allowed

 The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.

 

Can you help?

Like 0

Like

1 comments

Greetings! 

 

For the user to work through OData, you need to grant them access using the CanUseODataService code in the Operation permissions section. 

Show all comments

Hi everyone,
 

The requirement is to show all the Opportunity irrespective of the Account selected .Now it is being filter by Account. I'm trying to find the module where the implementation is done. I have attached the screenshots below for the reference .






Could someone help me with this ?

Regards,
Hindujashiri.
 

Like 0

Like

1 comments

Hello,

We have performed several tests and here is the result: 
if you go to "Not processed" folder and find any email that is not bound to any contact or account - you will be able to bind it to any opportunity in the application. 

But if you find any email that is already bound to a contact or account - then you will only be able to bind this email to the opportunity where this contact or account is a customer. 

This won't work if the account and contact are not bound to each other (for example, contact is not primary for an account or not connected to an account). 

We will create a separate idea for our R&D team so to develop this new functionality of binding email data. 

Best regards,
Antonii.

Show all comments

Hi,

 

I want to make a validator that endDate cannot be erlier than leave startDate, in endDate field in viewModelConfigDiff,

Expectation:

 

My Code:

 

"PDS_UsrLeaveEndDate_quo1xia": {
	"modelConfig": {
		"path": "PDS.UsrLeaveEndDate"
	},
	"validators": {
		"MySuperValidator2": {
			"type": "usr.FutureDateValidator2",
			"params": {
				"message": "#ResourceString(EndDateWarning)#",
				"startDate": "PDS_UsrLeaveStartDate_apq3vdm"
			}
		}
	}
}

 

   "usr.FutureDateValidator2": {
                validator: function (config) {
                    return function (control) {
                        let value = control.value;
                       let startDate =  config.startDate;
                        let valueIsCorrect = value > startDate;
                        var result;
                        if (valueIsCorrect) {
                            result = null;
                        } else {
                         console.log(startDate);
                         console.log(value);
                            result = {
                                "usr.FutureDateValidator2": { 
                                    message: config.message
                                }
                            };
                        }
                        return result;
                    };
                },
                params: [
                    {
                        name: "message"
                    },
                 {
                        name: "startDate"
                    }
                ],
                async: false
            },

 

But, value of startDate from the params is a String, how to get the actual value?

 

Thank you

Like 0

Like

0 comments
Show all comments

Hi all,

 

I would like to know if and how it is possible to add a font for configuring email account signature.

 

Best regards

 

stefano

 

Like 0

Like

1 comments

Hello,

To upload new fonts and use them in emails, you need to change the values of the system settings "CKEditor fonts list" ("CKEditor fonts list") and "CKEditor default font" ("CKEditor default font"). 

The "CKEditor fonts list" system setting is responsible for which font you will be able to see in the font drop-down list. It should be added to the beginning of the system setting list, with ";". 

Accordingly, in order to use this font, they just need to be installed on the server as a regular font. 

It is also necessary to know that if the recipient does not have this font, he will not see this font.

More information can be found in this instruction.

Best regards,
Antonii.

Show all comments