Hello,

 

I'm trying to create a rest service using the AFT Repository (2.0.2.4) and everything works as expected until I save the context when I get the error below. 

 

What I am missing?

 

Thanks,

Jose

 

Newtonsoft.Json.JsonSerializationException: Unable to find a constructor to use for type ATF.Repository.Providers.ResponseStatus. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Path 'responseStatus.ErrorCode', line 1, position 31.
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
  at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
  at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
  at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
  at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
  at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
  at ATF.Repository.Providers.RemoteDataProvider.BatchExecute(List`1 queries)
  at ATF.Repository.AppDataContext.Save()
  at C2C.CreatioDataIntegration.AppealDocumentManagement.Save() in C:\tfs\C2C_QLS\QLS\CreatioDataIntegration\CreatioDataIntegration\AppealDocumentManagement.cs:line 71
  at C2C.CreatioDataIntegration.AppealDocumentManagement.Add(AppealDocumentRequest request) in C:\tfs\C2C_QLS\QLS\CreatioDataIntegration\CreatioDataIntegration\AppealDocumentManagement.cs:line 65
  at Program.<>c.<<$>b__0_2>d.MoveNext() in C:\tfs\C2C_QLS\QLS\CreatioDataIntegration\CreatioDataIntegration\Program.cs:line 61
--- End of stack trace from previous location ---
  at Microsoft.AspNetCore.Http.RequestDelegateFactory.ExecuteTaskResult[T](Task`1 task, HttpContext httpContext)
  at Microsoft.AspNetCore.Http.RequestDelegateFactory.<>c__DisplayClass102_2.<b__2>d.MoveNext()
--- End of stack trace from previous location ---
  at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
  at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
  at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
  at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
  at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

 

File attachments
Like 0

Like

3 comments

Hi, does anyone have information on how best to carry out branching development in Creatio using Git? We've found plenty of pitfalls and issues with doing so that we work around in various ways, but it doesn't feel particularly streamlined and has plenty of trial and error involved, which isn't ideal!

 

Some of the things we encounter are desynchronisation of the database with the config, various errors thrown by the compiler, quite a consumption in time of switching branches, it being a bit easy to lose config changes unless you are very precise about how you change branches etc.

Like 1

Like

2 comments

Hello Harvey,

Based on our experience, most problems occur when switching branches that have different objects (for example, an object exists in one branch but not in another). This issue is not exclusive to Creatio but is common to all projects that use an ORM (Object-Relational Mapping) system to manage the database, such as EntityFramework. Therefore, the advice here is to avoid switching between such branches. If you must do so, remember to remove reverse references between objects (which are created for OData). I do this by executing the following queries in the database:

```sql
DELETE FROM SysSchemaSource WHERE SysSchemaId IN (SELECT Id FROM SysSchema WHERE SysPackageId NOT IN (SELECT Id FROM SysPackage));
DELETE FROM SysSchema WHERE SysPackageId NOT IN (SELECT Id FROM SysPackage);
DELETE FROM SysPackageSchemaData WHERE SysPackageId NOT IN (SELECT Id FROM SysPackage);
DELETE FROM SysSchemaSource WHERE Name LIKE '%backreference%';
```

After that, I perform a compilation.

Additionally, frontend schemas also have connections through the configuration (for example, the `SysModuleEdit` table), and if the schemas are missing, you might end up with a non-working UI.

In different branches, schemas can also be moved between packages, and the relationships in the configuration can break because of this.

This is precisely why only SVN is officially supported, and using Git comes with limitations similar to those when using SVN.

You should also consider that Git only deletes files, but folders may remain empty. While this is not an issue for Git, it is very important for Creatio. All empty folders are perceived as packages, and if a folder is empty, it will be populated when exporting code to the file system.

Also, deleting a package through Git will not remove the package in the configuration because Creatio reacts only to code changes, and if there are none, no changes will occur.

Our team has a whole list of such nuances, but we have written PowerShell scripts to solve most of them (for example, deleting all empty folders or removing a SQL script that remains when renaming it through the configuration and a new one is created with a new name).

I can describe our other rules as well, but that would take more time.

 

P.S. The Creatio system is well-designed if you follow its development features and keep it clean (for example, developers often delete schemas without removing resources, or they move schemas between packages through the file system to save time instead of doing it through the configurator). If you establish rules, adhere to them, and use helper scripts, development won't cause unpleasant issues.

Dear Harvey,

Unfortunately, there is no universal recommendation that could completely resolve your issue. However, here are a few key points to consider:
 

    1) All packages in the configuration should be tied to a single Git repository, since they depend on each other and need to be saved as part of a single commit. (It's not recommended to store each package in a separate repository.)


    2) Automatically generated folders in independent packages should be added to the .gitignore file.


    3) The obj folders in independent packages should also be added to the .gitignore.


    4) Only your custom packages should be added to the repository. For vendor packages (from Creatio) and Marketplace packages, use the standard methods (application installation, upgrading to a new version).


    5) Never modify vendor packages (from Creatio). To extend functionality, use inheritance and entity substitution.


    6) Schema metadata is difficult to merge and understand, so it is recommended that only one developer works on extending objects or modifying a specific schema.

    7) If a developer makes changes in one environment and commits them to the repository, and others pull these changes, there should be no database and configuration desynchronization issues.

    8) You can create scripts to quickly set up the environment and pull the necessary branch from the repository. This will help avoid issues with leftover data from a different branch.

Thank you!

Show all comments

Hello,

 

I'm following the clio tutorial to install Creatio from CLI, but I'm getting the error below. Any ideas on what I'm missing?
 

Thanks,

Jose 
 

clio version '6.1.0.37'


[ERR] - The requested service 'Clio.Command.CreatioInstallCommand.InstallerCommand' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.
 

Like 0

Like

1 comments

Hello,
 

The clio application is supported directly by the application developers on the github page.

We encourage you to consult our comprehensive documentation and engage with our GitHub community for assistance.


You can also ask your question and describe the error using this link.

 

https://github.com/Advance-Technologies-Foundation/clio/issues?q=is%3Ai…
 

Thank you.

Show all comments

Hello. Is there a way to fill the field values ​​from the master window in which you opened the lookup (lookup field) and clicked the "New" button? Something similar to how adding a record in a datagrid detail works. When you click add a record, a window with fields opens and these fields can automatically pull values ​​from the master page.

Like 0

Like

1 comments

Hello,
As far as I know, there are no methods to transfer data from the master record to a one created via a lookup window. But, the sandbox messaging should help you resolve this task. More on it here https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…

Show all comments

Hello,

 

I'm following this tutorial Lesson 1 - Installing clio (youtube.com) on VS Code, but when I get to the clio apps step I get this error:

 

[ERR] - Environment with key 'dev' not found. Check youre config file or command arguments.

Any ideas what I'm missing?

Thanks,
Jose

Like 0

Like

3 comments

Basically, clio creates it's own config file where it writes the configured environments to (on windows typically stored at C:\Users[username]\AppData\local\creatio\clio\appsettings.json). I believe by default it has an environment named "dev", but you can remove that. Can you give more info on the command you're running when you get the error? 

Ah, missed you said you're running clio apps. Try opening the config file I mentioned and change "ActiveEnvironmentKey" from "dev" to blank ""

Ryan Farley,

Thanks Ryan. That worked.

Show all comments

Good day.

 

Creatio has S3 integration, so there must be a S3 client inside. 

Where i can find it? Or any other possibilities to put file inside the current file storage.

 

In documentation i find example of storage implementation, witch i dont need because it is already contains S3 file storage integration.

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/back-end-development/api-for-file-management/examples/implement-a-file-content-storage

 

And a file data saved directly in database. This case is irrelevant too because im interested to put data in current storage (SysSetting ActiveFileContentStorage), not in database.

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

 

Appreciate any help. Thanks.

Like 0

Like

1 comments

Hello,
 

Uploading or accessing existing files should be done through the API for file management. 
We encourage you to read the documentation on the API for file management on Creatio Academy.
Also, in the documentation there is an example for creating new files using the Terrasoft.File.Abstractions.IFileFactory interface.

 

IFileFactory
 

Thank you.

Show all comments

Hello Creatio Community,

I am looking to set up a chart widget that can be dynamically filtered based on values from other fields on the same dashboard. Specifically, I want the chart, which is connected to the Case object, to update its data when a user selects a value from a dropdown field (for example, an Account field related to the Case). This would allow users to filter the chart data according to the field they select, providing a more tailored and interactive experience.

Any guidance on how to achieve this dynamic filtering within the dashboard would be greatly appreciated!

Like 0

Like

2 comments

Instead of adding a lookup, use a quickfilter component. I believe as long as you're on 8.1.4 or higher you can have that filter a chart elements directly.

Ryan Farley,

Hi Ryan,

Thank you for your insightful advice. 

Show all comments

diff: /**SCHEMA_DIFF*/[
         {
            
       "operation": "merge",
       "name": "DataGrid",
       "values": {
               "activeRowAction": {bindTo: "onActiveRowAction"},
               "activeRowActions": [
                       {
                               "className": "Terrasoft.Button",
                               "style":this.Terrasoft.controls.ButtonEnums.style.BLUE,
                               "markerValue": "myButtonAction",
                               "tag": "myAction",
                               "caption": "View image",
                               "enabled": false,
                               "visible":{bindTo: "IsButtonVisible"},
                         
                                 
                       }
               ],
               // "visible": {"bindTo": "isButtonVisible"},
               
       }
}
       ]/**SCHEMA_DIFF*/,
        methods: {
            isButtonVisible: function()
            {
           console.log("hello");
           const activerow= this.get("ActiveRow");
           if(activerow)
            {
 
              var msg= this.getActiveRow().get("UsrMessage") ;
               if(msg==="hello"){return false;}
               
            }
           return true;
             
         }
       }
    };

I tried adding button, and when giving visible:true, it is working fine, now i want to hide that button from some records of detail based on some condition so i bind it with the function, but it is not working, the function is not getting called/executed, when i am doing it at grid level then it is working fine, but not working on button, is there something am i missing or doing wrong, i even tried it using attribute and setting it's value in the function

Like 0

Like

2 comments

I've never been successful with binding values in ActiveRowActions to attributes to change them after render. They don't seem to have the same bindings as other view model elements do. The only way I've been able to get this to work is to modify the dom elements on row select to manipulate, which is a bit hacky. Alternatively, just add logic to the button click to validate if the action can be performed or not, which isn't ideal either.

Ryan

Ryan Farley,

Can you please elaborate on modifying dom elements, how can i do that, because that's the only option i can see too

 

Show all comments

Hi Community Members,

 

I have two tables: contact & account details (banking products) one to many mapping linked via customer id (sample data attached). I need to find all the contacts that don't have a particular account type say IRA SAVINGS in the given example. When I am applying filters (screenshot attached) - it gives me cust_id 2 as well since it has checking account as well although I want it to give me only cust_id 1. How can I apply this filter? Thanks

Like 0

Like

2 comments

Try changing

  1. "count > 0" to "count = 0" 
  2. then change "AccountType != IRA SAVINGS" to "AccountType = IRA SAVINGS"

Ryan

Ryan Farley,

That worked, thanks Ryan

Show all comments

Hello community,

 

is it possible to show on widget indicator the sign + when the number is positive?

I tried to setting the format formula "+0;-#" but it doesn't work.

Like 1

Like

2 comments

Yes please , or have it change to green/red if positive/negative --> in nocode :P

Hello,

 

Unfortunately there's no possibility to set this up in the system at the moment. However, we have registered this idea for our R&D team so they could review the possibility of adding such functionality in future releases.

Show all comments