Getting dateformat error during deserialization when calling a custom web service with the following JSON request:


{
  "ResultDate": "\"2000-01-01T00:00:00.000\""
}
The error message states:

The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:entity... "DateTime content '"2000-01-01T00:00:00.000"' does not start with '/Date(' and end with ')/' as required for JSON.' Please see InnerException for more details. See server logs for more details. The exception stack trace is: ...

Is there any way to pass a date in the "\"2000-01-01T00:00:00.000\"" format instead of using /Date(1511448000000)/

Like 0

Like

1 comments

Hello,

According to the given information, this article may be helpful:

https://stackoverflow.com/questions/44227653/content-date-does-not-start-with-date-and-end-with-as-requi

Also, you can write a DateTime to Unix timestamp converter and then extract the value:

public static DateTime UnixTimeStampToDateTime( double unixTimeStamp )
{
    DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);
    dateTime = dateTime.AddSeconds( unixTimeStamp ).ToLocalTime();
    return dateTime;
}

Best regards,

Anhelina!

Show all comments

Hi all,

I need to process files attached to a record, and i am using the process file element to get access to those files. I need to get the files itself in a process parameter, so i can manipulate them in a c# script task.  But i see no way how i can get the file or files collection retrieved by the process element in a process parameter.  What am i missing?

 

Greetings,

 

Vincent

Like 0

Like

3 comments

You can generate the printable doc via code as well, then use the file  bytes. See https://customerfx.com/article/running-a-word-printable-in-a-process-script-task-and-add-as-attachment-on-a-record-in-bpmonline/

The report.Data in that code sample will give you the bytes of the file itself.

Ryan

Thanks for the reply, but it's not what I'm looking for.  The documentation of the process file element says:

What to do with file? – select one of the following options:

  1. Use in process” if you need to use the file records in the process itself without saving the files to any Creatio object or if you need to pass the files to a different business process as a parameter.


My question is: how can i pass that file(collection) to a different business process (or a script taks). ..

Hello,

 

Essentially, the process file element works with collections of records. For example, when reading object attachments from a specific record, there can be more than one attachment.

Therefore, if we need to work with this data further in a script or another process, we should handle collections of files.

For instance, if we have read some attachments and selected the 'use in process' option, we can pass the file from the collection to a subprocess with a File parameter.

 In the subprocess, this file can then be accessed through the parameter.

 

 

 

 

Show all comments

Hi can anyone help to build a tile view in freedom ui , I wanted to recreate the grid view that was present in classic ui .

Like 1

Like

1 comments
Best reply

Hello,

Unfortunately, a tile view currently cannot be recreated in Freedom UI, and there is no option to display the images on the list page. We have registered a request with the responsible development team, and this team is working on adding this functionality in future releases.
 

Hello,

Unfortunately, a tile view currently cannot be recreated in Freedom UI, and there is no option to display the images on the list page. We have registered a request with the responsible development team, and this team is working on adding this functionality in future releases.
 

Show all comments

Hello Creatio Community,

I'm encountering several script errors while using Creatio, as shown in the attached screenshot. The errors appear to be related to the following components:

  1. GHierarchyViewGeneratorV2:
    • Script error on line 9.
    • Error related to GHierarchyViewGeneratorV2.
  2. GHierarchicalGridUtilitiesV2:
    • Uncaught error for GHierarchicalGridUtilitiesV2.
  3. ViewModuleWrapper:
    • Uncaught error for ViewModuleWrapper.

These errors seem to be occurring consistently, preventing me from loading specific modules. I've tried refreshing the page and clearing the cache, but the issue persists.

Has anyone else encountered these errors, and if so, what steps did you take to resolve them? Any insights or suggestions would be greatly appreciated.
Screenshot:

 


Thank you in advance for your assistance!

Like 0

Like

1 comments

Hello,

Script Errors mean there are some issues with the code in a specific schema. In order to fix it we recommend asking the developers of the set schema so that they can check if there are any errors in the code.

Show all comments

Hi,

 

Is it possible to set a title for a column in a DataGrid dynamically via client code?

 

I tried the following steps:

  1. Add an attribute to viewModelConfigDiff called "InspectorsSundayCaption".

 

            viewModelConfigDiff: /**SCHEMA_VIEW_MODEL_CONFIG_DIFF*/[
            {
                "operation": "merge",
                "path": [
                    "attributes"
                ],
                "values": {
                   "InspectorsSundayCaption":{
                   },

            ......}

 

  2. Bind the attribute to the caption property of column

                       {
                            "id": "aaa335c2-8291-0f65-e930-e39ca7e333a7",
                            "code": "DataGrid_244wb6vDS_UsrwpPoliceCarsSunday",
                            "path": "UsrwpPoliceCarsSunday",
                            "caption":"$InspectorsSundayCaption2",
                            "dataValueType": 4
                        },

 

  3. Set the attribute in the HandleViewModelInitRequest handler with the specific value.

 

    {
                request: "crt.HandleViewModelInitRequest",
                  handler: async (request, next) => {

                           .....

                           request.$context.InspectorsSundayCaption = "Sunday inspectors " + sundayDateStr;

                           await next?.handle(request);

}

 

This way work to me in normal column caption, But it doesn't work in a DataGrid column

 

Is there any limitation/step I'm missing?

 

Thanks in advance for your assistance!
Rachel
 

 

Like 0

Like

2 comments

Hi,
Does anyone have an idea?

Hello Rachel Markovski,

I have contacted our R&D team in order to help find a solution for your problem. The answer is unfortunate - currently there is no mechanism to dynamically change column caption in the datagrid component. 

Hope this helps.

Show all comments

Hello,

I need to create a custom handler for a button. It is necessary that after the button is clicked, two actions are performed sequentially: first, the record should be saved, and then a process should be triggered. My code isn't working. Could you please help?

 

        handlers: /**SCHEMA_HANDLERS*/[
 {        
     request: "crt.CustomHandler",
     handler: async (request, next) => {
   const result = await next?.handle(request);
   const handlerChain = sdk.HandlerChainService.instance;
   // Спочатку зберігаємо дані
   await handlerChain.process({
       type: 'crt.SaveRecordRequest',
       $context: request.$context,
       dataSourceName: "PDS"
   });
   // Потім викликаємо процес
   await handlerChain.process({
       type: 'crt.RunBusinessProcessRequest',
       $context: request.$context,
       processName: "srProcess_5c65949",
       processRunType: "ForTheSelectedPage",
       showNotification: true,
       recordIdProcessParameterName: "ID"
   });
   return result;
}
}
]/**SCHEMA_HANDLERS*/,
Like 0

Like

2 comments
Best reply

Ігор Роїк,

Hello,

Have you tried importing a "creatio-devkit/common dependecies" as well as passing sdk as a parameter to your schema function? 1

 message: Uncaught Error: Uncaught (in promise): ReferenceError: sdk is not defined
ReferenceError: sdk is not defined

Ігор Роїк,

Hello,

Have you tried importing a "creatio-devkit/common dependecies" as well as passing sdk as a parameter to your schema function? 1

Show all comments

How to change the status of the Progress bar Page based on the activity status

Like 0

Like

1 comments

Hey guys,

 

How can I close the navigation sidebar programmatically?

 

I'm trying to implement the same behavior that happens when you press the button indicated in the image below, making the main navigation bar to hide, so I can give users more width space for the section form screen without them to having to do that.

 

 

I tried with something like this based on what I saw somewhere in the code, but is not working for me.
 

const closeSidebarRequest = { 
	type: "crt.NavigationPanelChangeVisibleRequest", 
	$context: request.$context, 
	isVisible: false 
	};
 
await request.$context.executeRequest(closeSidebarRequest);

 

 

Thanks!

 

 

 

Like 0

Like

3 comments

Hello Andres,
Thank you for your question.

I am a bit confused as I do not understand the business need for this customization. Could you please clarify if this is a necessity? From my point of view, this feature is a bit of an overkill. First of all, there is already a button to control whether or not the navbar is shown. If the user wants to have control over seeing the navbar, and you implement an additional way to do so (for example, another button), then you will have two buttons for the same task. Secondly, I think that calling crt.NavigationPanelChangeVisibleRequest will not help.


I will be glad to assist you if you need to implement this functionality. I am curious about how you plan to control the visibility of the navbar.

Hi Yevhenii, 


In our case users are mostly working on one section and do not move from there. I'd like to hide the navbar by default when they enter to creatio and as you said, in case they need to navigate outside of that section they can open it with the button thats already there.

 

Is there any way to hide the navbar by default for all users? That is what I'm trying to accomplish, not another button.

 

Thanks,

Andres

Hello Andres,

I have come up with a solution that might help. When the user navigates to the application, the left panel is hidden/collapsed by default. If the user wants the left panel to be visible, they can click on the top-left button to show the navigation panel. To do this, I replaced the MainShell schema with the following code:
 

define("MainShell", /**SCHEMA_DEPS*/["@creatio-devkit/common"]/**SCHEMA_DEPS*/, function/**SCHEMA_ARGS*/(sdk)/**SCHEMA_ARGS*/ {
   return {
       viewConfigDiff: /**SCHEMA_VIEW_CONFIG_DIFF*/[
       ]/**SCHEMA_VIEW_CONFIG_DIFF*/,
       viewModelConfig: /**SCHEMA_VIEW_MODEL_CONFIG*/{
           attributes: {
           }}/**SCHEMA_VIEW_MODEL_CONFIG*/,
       modelConfig: /**SCHEMA_MODEL_CONFIG*/{}/**SCHEMA_MODEL_CONFIG*/,
       handlers: /**SCHEMA_HANDLERS*/[
           {
               request: 'crt.HandleViewModelInitRequest',
               handler: async (request, next) => {
                   const viewModel = request.$context;
                   viewModel["WorkplaceNavigationPanelVisibleAttribute"] = false;
                   return next?.handle(request);
               }
           },
           ]/**SCHEMA_HANDLERS*/,
       converters: /**SCHEMA_CONVERTERS*/{}/**SCHEMA_CONVERTERS*/,
       validators: /**SCHEMA_VALIDATORS*/{}/**SCHEMA_VALIDATORS*/,
   };
});

 

Hope this will help you.

Show all comments

Hey guys,

 

How can I close the navigation sidebar programmatically?

 

I'm trying to implement the same behavior that happens when you press the button indicated in the image below, making the main navigation bar to hide, so I can give users more width space for the section form screen without them to having to do that.

 

 

I tried with something like this based on what I saw somewhere in the code, but is not working for me.
 

const closeSidebarRequest = { 
	type: "crt.NavigationPanelChangeVisibleRequest", 
	$context: request.$context, 
	isVisible: false 
	};
 
await request.$context.executeRequest(closeSidebarRequest);

 

 

Thanks!

 

 

 

Like 0

Like

0 comments
Show all comments

Hello Creatio Community,

 

I am currently working on a Python application that extracts data from the Creatio API using the OData protocol. The application has been successfully tested in our quality environment, where it functions flawlessly. However, as I prepare to deploy the application in our production environment, I need some clarification on how to handle SSO (Single Sign-On) authentication for API access.

Here are the key details and questions:

 

User Account for Authentication:

In our production environment, which uses SSO, should I use a Creatio user account that is specifically added to the SSO group, or can I continue using a regular Creatio production user account, as I did successfully in the quality environment without SSO?

 

API Authentication Configuration:

For SSO-based authentication in the production environment, is there any additional configuration required in the API call setup compared to what is recommended in the Creatio documentation for environments without SSO?

Here is the reference to the documentation I’m following:  https://documenter.getpostman.com/view/10204500/SztHX5Qb#46f97170-d66d-4ed9-8941-08590bcdf444.

 

Environment Links for Reference:

 

If there are any best practices or specific considerations when transitioning from a non-SSO environment to an SSO-enabled production environment, I would greatly appreciate any insights. This includes potential pitfalls, user account configurations, and any modifications required in the API requests when dealing with SSO.

 

Thank you in advance for your support and guidance!

Like 1

Like

2 comments

Hello,
 

All external requests to Creatio must be authenticated. There are two ways to do this:
 

1) Forms authentication (cookie-based) implemented using the AuthService.svc web service. For this authentication, you need to use a regular user in the Creatio system that has not been created using SSO. You can test this on the Supervisor user who is initially logged in.
2) OAuth 2.0 is one of the supported authorization types in Creatio. Identity Service implements OAuth 2.0 in Creatio. It authorizes third-party apps and web services you integrate with Creatio using OAuth 2.0.
 

You can find the corresponding authorization examples (AuthService.svc and OAuth 2.0) in the official Postman collection of OData protocol requests for Creatio.


So, to summarize - you don't need to be tied to SSO users and you can use a regular user or OAuth 2.0 authorization.
 

Have a nice day!

Serhii Parfentiev,

Thank you for the clarification!

 

I wanted to provide some additional context regarding my situation. I am using user account authentication, and there are two different URLs for authentication in our production environment:

 

SSO Authentication: https://LINKPROD.ma/Login/Login.html?use_sso=true

This link is used when users need to authenticate via SSO.

 

VPN Authentication: This link is used for users connecting through a VPN and involves a different authentication process.

 

In my case, I need to connect using the SSO link. I’m currently trying to authenticate with this link: https://LINKPROD.ma/ServiceModel/AuthService.svc/Login, using the username and password of a regular Creatio user (not an SSO user). However, this approach doesn’t seem to be working.

 

Is there any specific configuration or additional steps I need to take to ensure successful authentication through the SSO link using a regular Creatio user account?

 

Thank you again for your support!

Show all comments