Hello all,

I am currently trying to update the standard Invoice object record's field; "payment amount" with a calculated sum collected from a custom object called: "Payments" from it's "Amount" field.

-Payments Record Added has the filter conditions of, "Amount is filled in"
- Payments Record Deleted has no filters
- Payments Record Modified has the, "Changes expected in any selected fields = 'Amount'"
 

 

 


 


And this is the current Invoice Record:

 

The Payment Amount field AND the test payment amount field I created show no input despite refreshes and alterations. I would appreciate any suggestions on my wrongdoings, as this is a more fundamental business process I have used before.

Thank you in advance for any help you can provide.

Like 0

Like

0 comments
Show all comments

Hi Community,

 

We have this requirement, where we need to receive a complex json object and then store it in our database as a string, without using DataContracts.

 

To achieve this we though about using the "object" type and then serialize it into a string using JsonConvert.SerializeObject method. 

 

	  [OperationContract]
	  [WebInvoke(Method = "POST", UriTemplate = "/store", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json)]
      public Response AddStore(object store) {
 
         Response response = new Response();
         response.MessageId = "1";
         response.Description = "Store Inserted!";
 
        string storeString = JsonConvert.SerializeObject(store, Formatting.Indented);
 
        var ins = new Insert(UserConnection)
        .Into("ImdStagingInArticle")
        .Set("ImdMessage", Column.Parameter(storeString))
        .Set("ImdStateId", Column.Parameter(new Guid("2d1dee23-058b-45fe-95a0-2e1612fc4261")));
 
        ins.Execute();
 
        return response;   
      }

 

However, the string is always empty. 

 

Since the json is to complex, the serializer cannot process the entire json data. 

 

We also tried to use WebOperationContext, but that doesn't work.

 

Can someone help us solve this issue? Did anyone have something similar?

 

Thank you.

Like 0

Like

7 comments

Hi,

 

First of all you need to make sure that you can convert the object into a string in general. Like create a Visual Studio project, add the logic to convert the object into a string using JsonSerializer like

 

string jsonString = JsonSerializer.Serialize(myObject); Console.WriteLine(jsonString);

 

And see the result. After the number of tests find the way when the data you pass is converted into the string and then start developing an additional logic of storing this data in the Creatio database using the insert query you used.

 

Alternatively find the way to make the object to have a constant set of keys so to be sure it will be converted to the string as needed.

Oleg Drobina,

 

After some changes I got it to work, by reading the raw body before the automatic parsing. However, this is working only on our Linux environment. As for for windows environment (Creatio Cloud), we are receiving some parse errors. 

 

      [OperationContract]
      [WebInvoke(Method = "POST", UriTemplate = "/article", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json)]
      public Response AddArticle(string articleJson) {
 
        string result = "";
        Stream inputStream = HttpContext.Current.Request.Body;
 
        inputStream.Position = 0;
        using (StreamReader reader = new StreamReader(inputStream, Encoding.UTF8))
        {
            result = reader.ReadToEnd();
        }
 
        var parsedJson = JsonConvert.DeserializeObject(result);
        string jsonString = JsonConvert.SerializeObject(parsedJson, Formatting.Indented);
 
 
 
 
 
        Response response = new Response();
        response.MessageId = "1";
        response.Description = "Article Inserted!";
 
 
 
        var ins = new Insert(UserConnection)
        .Into("ImdStagingInArticle")
        .Set("ImdMessage", Column.Parameter(jsonString))
        .Set("ImdStateId", Column.Parameter(new Guid("2d1dee23-058b-45fe-95a0-2e1612fc4261")));
        ins.Execute();
 
        inputStream.Close();
 
        return response;  
      }

 

What could be the cause for such weird behaviour?

 

Thank you.
      

 

Pedro Pinheiro,

 

Well, it shouldn't happen. Maybe there is still some difference in the content we pass in the local machine and in the Windows machine?

Oleg Drobina,

 

The requests are the same for both local and cloud environments, except the address and credentials.

 

However, when I execute the request on the cloud environment I get this error:

 

 <p class="heading1">Request Error</p>
       <p>The server encountered an error processing the request. The exception message is 'This method or property is
           not supported after HttpRequest.GetBufferlessInputStream has been invoked.'. See server logs for more
           details. The exception stack trace is: </p>
       <p> at System.Web.HttpRequest.get_InputStream()
           at Terrasoft.Configuration.ImdArticleAPI.ArticleAPI.AddArticle(Object article)
           at SyncInvokeAddArticle(Object , Object[] , Object[] )
           at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp;
           outputs)
           at Terrasoft.Web.Common.ServiceModel.ThreadContextInitializer.Invoke(Object instance, Object[] inputs,
           Object[]&amp; outputs)
           at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp; rpc)
           at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp; rpc)
           at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&amp; rpc)
           at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</p>

 

Have you encountered something similiar? What could be the cause for such error?

 

Thank you.

 

Pedro Pinheiro,

 

Creatio doesn’t know how to serialize/deserialize object. If you change object to string in Response AddStore(object store) you will be able to parse it with JsonParser of your choice.

Kirill Krylov CPA,

 

The problem is, if I change it to string I can only send strings to this endpoint (The Json must be converted to a string). Because, if I try to send a Json Object I get "400 Bad Request".

 

 

 

Hello everyone,

 

I managed to get it working by receiving the body as a Stream instead of a String.

 

With this solution, I don't get the "400 Bad request" and I can process any Json object.

 

I don't know if this is the best solution, but it's working for now.
 

	  [OperationContract]
      [WebInvoke(Method = "POST", UriTemplate = "/article", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json)]
      public Response AddArticle(Stream requestBody) {
 
        string result = "";
 
        using (StreamReader reader = new StreamReader(requestBody, Encoding.UTF8))
        {
            result = reader.ReadToEnd();
        }
 
        var parsedJson = JsonConvert.DeserializeObject(result);
        string jsonString = JsonConvert.SerializeObject(parsedJson, Formatting.Indented);
 
        Response response = new Response();
        response.MessageId = "1";
        response.Description = "Article Inserted!";
 
        var ins = new Insert(UserConnection)
        .Into("ImdStagingInArticle")
        .Set("ImdMessage", Column.Parameter(jsonString))
        .Set("ImdStateId", Column.Parameter(new Guid("2d1dee23-058b-45fe-95a0-2e1612fc4261")));
        ins.Execute();
 
        return response;  
      }

 

Feel free to give any feedback on this solution.

 

Thank you.

 

Show all comments

Hi There, 

I'm trying to create a sales forecast. To create it I want to use figures from 2024. However the time periods for the columns need to be 2025. Is there a way I can see actual historic data? I.e January 2024 vs January 2025? 

The only way I found I can do this is by manually entering the 2024 data. However, given that I'm doing this for a number of different businesses it's very tedious. So for example in the period column for March 2025, I would like to see actual salees figures from March 2024, the forecasted amount (based on March 2024) followed by the Actual sales figures. 

 

I'm using Invoice owner acount to specify the different business units (rows) and Invoice created on filed to specify the time period. 

Thank you 

Like 0

Like

1 comments

Hello!

Unfortunately, the planning functionality is currently unable to process values from a previous period.

The described case is best solved with the help of the MP solution: https://marketplace.creatio.com/app/calculated-metrics-creatio. There it will be possible to output three indicators: Current Fact, Previous Fact, Percentage of the ratio of the current to the previous one.

Best regards,
Anton

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

3 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.

Show all comments

Is it possible to bind knowledge base articles to packages, or in some other way move them between environments in an effective way? The client wants to be able to set up articles in their Pre environment and transfer them into Prod when ready, but the documentation doesn't provide information on the possibility of this.

 

It also might not be ideal to bind this data in a non-dev environment, since you will then have packages that must be created from non-dev environments to accomplish this, so perhaps there is another recommended way of moving such data between environments?

 

We are currently on 8.1.3, planning on upgrading to 8.2.1 soon, and are using exclusively Freedom UI sections.

Like 2

Like

2 comments

Hi Harvey

I recommend using an integration tool like Make.com to automate transferring KB articles from Pre to Prod. Configure Make.com to fetch articles from Pre instance then insert them into Prod. This avoids dependency on packages and works seamlessly across versions.

Thank you
Mohamed
 

Mohamed Ouederni,


Interesting, do you use this in other use cases ?

Damien

Show all comments

Hi guys! We have issue with CaseRatingFeedbackPage - in page we have just 2 radio button, 1 text area and 1 submit button. But page performance is so slow.


its how page looks:



 

Like 1

Like

8 comments
Best reply

and it loads a lot of js files:

and it loads a lot of js files:

Hello!

Thank you for sharing the details. Based on the provided information, here are a few key theories about what could be causing the performance issues on the CaseRatingFeedbackPage:
 

  1. Number of Requests:
    A high number of requests being triggered when the page loads or during user interaction can significantly impact performance. This could be related to customizations or additional scripts implemented on the page, which might introduce extra requests.
     
  2. Network Speed or Connection Issues:
    The fact that a small file (e.g., 33 KB) takes 2 seconds to load strongly indicates potential problems with the internet connection or network conditions. This delay could result from low bandwidth, high latency, or temporary connectivity issues.

    Recommended Next Steps:
     
  3. Analyze Requests and Customizations: Use a network monitoring tool (e.g., Chrome DevTools) to identify unnecessary or excessive requests. Pay particular attention to requests introduced by custom scripts or third-party dependencies.
     
  4. Check Network Conditions: Test the page performance under different network conditions to confirm if the issue persists with stable and high-speed internet.

    Best regards,
    Anton

Anton Starikov,

Hi Anton, thanks for response. There is no any network/speed issue. In the network I see a lot of JS loading which initiator is "error-list-dialog.js". 
here is the added code to this page:
 

Kamran Mammadov,

The fact that the files are taking so long to download indicates a network problem. Could you please check this also?
Is the result the same with other networks?

Anton Starikov,

Yes, it comes as issue from business, so it tested in different environments/networks

For what it's worth, the CaseRatingFeedbackPage always loads horribly slow for me as well, even without customization to it. Even for cases with Creatio in their success portal, often the page doesn't even completely load.

Ryan

Yep, 

A couple pages still needs some code optimization for performance. In general, load time is also very very sensitive to wifi quality I noticed, a whole much more than any other of our web apps we use.  

Lots of improvements happened last year, hopefully this trend of performance improvements will continue :). 

 

Thanks to all!

Show all comments

Hello! 

I'd like to ask for your advice please on how to use the Map widget for Creatio add-on. 
https://marketplace.creatio.com/app/map-widget-creatio

According to the add-on description it should appear in the chart dashboard type as 'Bubble map'. Please see the screenshot below. 

image.png

However, when I create a chart dashboard the 'Bubble map' is not there on the list. 



I have also checked the widget type and by default it's always like the one below, also on a new bundle. 


 

Could you please explain to me how can I built such bubble map dashboard?
I'd appreciate if you could share your expertise on this matter. 

Sales creatio, v. 8.1.4

Best Regards,
Jacek Harlejczyk

Like 1

Like

5 comments
Best reply

Jacek Harlejczyk,

 

Sorry for the delayed reply. The solution is now compatible with all Creatio products. Please install the updated version from the Marketplace and let me know if everything works as expected.

Have a good one!

Hi Jacek,

 

The "Bubble map" type is available for only the Map chart. We will add this note to the listing description.

Olena Sidko,

 

Hi Olena,

 

Thanks for getting back on this. 

 

The thing is that when I add a new dashboard, I cannot see this 'Map chart' dashboard type. Would you know what could be causing this? 

 

All the nest in 2025! :-)
Jacek 

Hello! Would anyone have any idea why the 'Map chart' dashboard type is not listed? Thanks!

 

Jacek Harlejczyk,

 

Sorry for the delayed reply. The solution is now compatible with all Creatio products. Please install the updated version from the Marketplace and let me know if everything works as expected.

Have a good one!

Olena Sidko,

Thank you for your help. It's working now. 
Best!
Jacek

Show all comments

Hi Community, I'm trying to create a system, that allows me to easily assign Brands and Models to Products and spare parts, to make it easier for the support teams and sales team to find related products. For the "main" products i.e a laptop, this is easy enough, i.e Brand: Lenove, Model: Thinkpad 4

 

However, now that I'm looking at spare parts the same logic becomes much more difficult i.e a charging cable. The charging cable might be suitable for Lenove Laptops and Asus Laptops and multiple models of each. 

 

How do I assign multiple brands and models to that charger? The only options I see is to create merged brands and model i.e "Asus, Lenovo", however I am worried that this will get very messy very quickly and impossible to maintain as new products get added to the inventory... 

 

In the perfect world, I would like to be able to open any product and have a filtered list by (product brand and product model) on the same page, which will display all spare parts and accessories that is compatible with that product. 

 

Does anyone else face similar issues? Maybe I'm just overthinking it all and there is a really easy solution to it :)!

 

Thank you in advance!

 

Julia 

 

 

Like 0

Like

3 comments

Hello!

Thank you for the detailed description of the problem. The implementation you described assumes the use of a many-to-many relationship, which cannot be supported directly in the relational database structure.


Please note that in relational databases, the many-to-many relationship cannot be directly implemented because it violates the principles of the relational model, which is based on atomic data and normalization. Instead, such relationships are resolved using an intermediate (junction) table.

These are tables that reference two other tables and define the relationships between them. For instance, if we have Table 1 and Table 2, and we need to establish a multi-relationship between them (e.g., linking a record in Table 1 to multiple records in Table 2), we would create a junction table. This table would contain references to both tables and define the dependencies.

This approach allows us to implement a multi-selection mechanism, such as associating a product with multiple brands or categories (e.g., one product having three or more associated brands).

 

Here’s an example of how the table could look:

CompatibilityID    ProductID    BrandID
1                             101                1
2                             102                1

3                             101                2

Thank you Arsenii Ostapyk, that seems like it may be the solution to my problem. I have done a search through Creatio Academy for "junction" or "junction table". Can you point me in the right direction on where I can find information on how I go setting this up?

 

Julia Molnar,

 

Please note that we do not have any instructions or examples for this, since the question relates to the general Database structure principles, rather than to the Creatio system functionality. However, you are welcome to use the public open sources for more in-depth details on the subject.

Show all comments

Hi Community,

 

We are trying to create a filter for this detail, that will use two conditions (one for each column) and a logical operator of “OR”. So basically, we only want the records that have the main record id on one of these columns (Contrato or Contrato Umbrella).

 

 

To achieve this, we first tried to add the filter using the FreedomUI Page Designer. However, the filter does not work with the logical operator “OR”.

 

 

So we needed to add it manually, through code. By following this post https://community.creatio.com/questions/detail-filter-freedom-ui. But that didn’t work.

 

 

An alternative was to add the filter in the viewModelConfigDiff section, but we don’t know how can we make the value dynamic.

 

 

Could you please help us find a solution to this problem?

 

Thank you.

Like 3

Like

1 comments

Hello Pedro,

Please review one of the community questions to find the example of Terrasoft.LogicalOperatorType.OR usage.

Additionally here is an explanation of how filtration on Detail work for FreedomUI. 

Case description:
On Contacts page there is a Job experience detail with listed companies where the person worked. Our goal is to show only those departments in the department field that are specified for chosen employer (Account object). So, for this case, Alpha Business has only 2 departments listed in the Departments detail. We only want to see those 2 departments when choosing a department for this account on Job experience detail on Contact page. 

For filtering we basically need just 2 base handlers to be triggered:

  1. crt.DataGridActivateRowBusinessRulesRequest – triggered when we click on an existing detail row or add a new one.
  2. crt.HandleViewModelAttributeChangeRequest – triggered when we change a value of fields.

We also need to create our own handler which we can name usr.ApplyDepartmentFilter. This one would find the currently active row of our detail to have access to its manipulations. After that, we check if account field is filled in and if yes, we create a filter for the Department field. To apply it, we need to use setValue method by targeting filterAttributeName that can be created using the formula: 
"{detailName}DS_{targetFieldName}_List_BusinessRule_Filter".
After that, it is important to use markAsPristine method to make sure that the attribute is applied silently, without forcing us to save the row.

As for crt.DataGridActivateRowBusinessRulesRequest, here we just need to filter it by request.dataGridViewElementName === "CareerList" to target only the detail needed and then call the execution of usr.ApplyDepartmentFilter request that was added earlier.

In crt.HandleViewModelAttributeChangeRequest handler we need to cover the situation when the Employer (Account) field is changed to update the filtration for Department field. First of all, we check if request.attributeName === "CareerList". After that we select the active row and get control over Account field. We check if it’s changed by using account?.dirty property and also if it has value with account?.value?.value, because we would want to filter Department field only in case the Employer is filled in. If those 2 conditions are met, we use markAsPristine method for the account field attribute. We use this one here because it will allow us to handle the subsequent changes of the Employer field. Without it, the field will remain dirty until we save the row. Eventually, we need to set value of the Department field to null using: row?.getAttributeControl(attributeName + "DS_Department").setValue(null, {silent: true});
After that, the usr.ApplyDepartmentFilter handler can be executed to apply the filtration of Department field by Employer.

Show all comments

Hi community,

Calling a Business process is quite easy in FreedomUI, by adding a button and choosing

Action: Run process.

The problem with this approach is that once the button is clicked, there is no validation happening in the page.

Is there any code snippet or workaround that when clicking a button that runs a business process, prior to the calling of the process a validation(practically a Save) happens?

Sasori

Like 1

Like

6 comments

The only option currently is to wire up code for the button. It would first save the page, then if the save was successful you would execute the process. 

See how to save the page and detect if it was successful here: https://customerfx.com/article/saving-a-page-before-some-action-on-a-creatio-freedom-ui-page/

See how to start the process via code here: https://customerfx.com/article/starting-a-process-from-client-side-code-on-a-creatio-freedom-ui-page/

Ryan

Ryan Farley,

Thanks for the response Ryan. Do you actually have an example on how to integrate within the 'CustomMethod' both crt.SaveRecordRequest and crt.RunBusinessProcessRequest ?

Ryan Farley,

Ryan if im not mistaken, with the suggested approach , every time the user will click the SAVE button, the overriden crt.SaveRecordRequest will be called?

In the first linked example, you would only be running that `usr.CustomCodeRequest` handler when you click your custom button. If you put the code inside the crt.SaveRecordRequest handler, then it would be run every time the user saved the page in some way.

Sasori Oshigaki,

As Harvey mentioned, the code for your button will only execute when the button is clicked, not when the Save is clicked. Your button will also initiate a save and then, if successful and validated (and the save occurred) it will then execute the process. The code from the first article triggers the save to happen and then provides the result. In the article (the first one) the save returns a result, where the code has // save was successful, continue with something else here you'd replace that with the code to start the process (the second article). If needed, you can see how to wire up custom code to your button in this article: https://customerfx.com/article/adding-a-button-to-execute-custom-code-on-a-creatio-freedom-ui-page/

Ryan

Thank you  both Ryan and Harvey! Was able to achieve what i intended!

     {
    request: "so.SaveAndRunBP",
    handler: async (request, next) =&gt; {
            const saveRecordRequest = {
            type: "crt.SaveRecordRequest",
            preventCardClose: true,
            $context: request.$context
        };
        if ((await request.$context.executeRequest(saveRecordRequest)))
        {
          const handlerChain = sdk.HandlerChainService.instance;
          const result = await handlerChain.process({
              type: "crt.RunBusinessProcessRequest",
              processName: "SoGenerateContact",
              processParameters: {
                  ContactId: await request.$context.Id,
              },
              $context: request.$context
          });
        }
        return next?.handle(request);
    }
}
Show all comments