Hi,

I am wanting to achieve the following:

1. Activity Status = Completed AND Category = To Do

2. Upon save, field validation occurs to display a pop-up (or similar) asking user to set a correct Category value

 

This is to improve data analytics for the category data, as currently my users are not changing this value when an activity is completed. A category of To Do, does not make sense if the activity is now complete you see.

I found this post - https://community.creatio.com/questions/messagebox-display-popup-box-requesting-user-confirm-some-situation, but I do not know how to complete this for the correct actions i.e. Only when the above condition is in place and click Yes means continue and submit the form or No means close window and allow user to change Category value.

Thanks for any help.

 

Like 0

Like

2 comments
Best reply

Hello Mark, 



Please refer to the following code in order to add the functionality requested:

 

define("ActivityPageV2", [], function() {
    return {
        entitySchemaName: "Activity",
        messages: {
        },
        methods: {
            save: function() {
                var IsToDoCategory = this.get("ActivityCategory") && 
                    this.get("ActivityCategory").value === "f51c4643-58e6-df11-971b-001d60e938c6";
                var IsCompletedStatus = this.get("Status") && 
                    this.get("Status").value === "4bdbb88f-58e6-df11-971b-001d60e938c6";
                if (IsCompletedStatus && IsToDoCategory) {
                    this.showConfirmationDialog("Please, set proper category!");
                } else {
                    this.callParent(arguments);
                }
            }
        },
        details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
        diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/
    };



Kind regards,

Roman

Hello Mark, 



Please refer to the following code in order to add the functionality requested:

 

define("ActivityPageV2", [], function() {
    return {
        entitySchemaName: "Activity",
        messages: {
        },
        methods: {
            save: function() {
                var IsToDoCategory = this.get("ActivityCategory") && 
                    this.get("ActivityCategory").value === "f51c4643-58e6-df11-971b-001d60e938c6";
                var IsCompletedStatus = this.get("Status") && 
                    this.get("Status").value === "4bdbb88f-58e6-df11-971b-001d60e938c6";
                if (IsCompletedStatus && IsToDoCategory) {
                    this.showConfirmationDialog("Please, set proper category!");
                } else {
                    this.callParent(arguments);
                }
            }
        },
        details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
        diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/
    };



Kind regards,

Roman

Thanks for your reply Roman, this worked beautifully.

 

I am interested in the GUID values you have in the code, is there any meaning to these values?

 

Note for others, the code above needs the && replaced with &&

Show all comments

Hello community!



The following article describes how to send a message from the Creatio server to the client via the WebSocket established out-of-the-box. Can we use the same WebSocket to send back messages to the server from the client?? If Yes, How?

Like 0

Like

1 comments

Hello,

 

We don't have a possibility to send the Websocket message from the client to server since there is nothing to handle this message on the server. In this case you can create your custom configuration service and send requests via this service - here is an example of such a service https://academy.creatio.com/documents/technic-sdk/7-16/creating-configuration-service-0

 

Best regards,

Oscar

Show all comments

Hello community,



I have a few questions reg the out of the box time zones lookup. I looked up the Creatio academy and it does not have answers to my questions. 



1. Is the column 'American code' used anywhere? If Yes, why is it blank in the out-of-the-box time zone look up? What is this column meant for?

2. Is the time zone offset column used anywhere? I tried the following - 

Using data import, I changed the offset value of Alaska to 'GMT+5.30'. I then went to a system user contact whose time zone is set to Alaska. I still see the time as per Alaska and not as per GMT+5.30. From where does Creatio retrieve offset values to show local time in a contact's time zone?

3. Similar to #2, I renamed the 'Code' column for Alaska to Gibberish. Now the System does not show any local time in the contact profile.



I infer that, Creatio reads the 'Code' value and fetches the offset from Windows server settings? Can you also confirm that Creatio does not use the 'Offset' column given in the lookup?

Like 0

Like

3 comments

Hello Shrikanth,

 

Hope you're doing well.

 

The time which is displayed in the system is based on the server time + value of the user profile offset column. If you are using the OOB columns, you need to check the server time by running the next query:

 

SELECT GETUTCDATE()

 

The result of this query will show the current UTC server time. After that, you can compare these data with your user's time zones settings.

 

As I can understand, you have changed the "Code" and "Time zone offset" column via DB, as far as the lookup "Time zones" is a system lookup that is locked for editing (except of the "Name" column). Blocked values are needed for login in the system. After editing or adding a new value users with this time zone sometimes can have troubles with the login process, so this is why those columns are locked. Also, need to pay attention to the address of the contact, because the city/state can have the time zone which is different from the default time zone for that country.

 

Best regards,

Roman

Roman Rak,

Hi Roman. Thanks for your response. Yes, I did check the address' city/state and ensured that they are valid for my use case.



#2 - I changed the offset column value and still no change happened (I logged out/logged in, refreshed page, cleared Redis cache etc).

 

I even changed the offset to 'UTC+5:30', It still showed Alaska time. This is noteworthy because, all the default offsets are in GMT. I changed it to UTC and expected the system to break. It didn't. It still showed me Alaska time. This makes me doubt if this column is being used at all.



#1 - What about 'American code' column?

Hello Shrikanth,

 

Thank you for your questions.

 

About the 'American code' column: at the moment this column is out of use and doesn't affect any functionality. If you want us to delete this column (or add/edit any other system columns/settings/values), please inform the Creatio support team.

 

At the moment there is no possibility to change the records for 'Time zone offset' and 'Code' columns via standard system tools because they are related to system settings and have unique values in the DB. Also during the populating the "Time zones" lookup developers added all actual timezones at the moment. We really appreciate your idea and have created the feature request for providing the possibility of adding/changing  "Time zones" lookup records in the future releases of the Creatio application.

 

Best regards,

Roman

Show all comments

Hello community,



We are using Creatio 7.16.3 Service enterprise on-premises (Infra on AWS cloud). We have a use case where certain fields on the Creatio GUI need to send and receive real time updates for a specific user across multiple browser client instances that s/he might be using.



We have zero-ed in on Firebase real time database to maintain state on the server side. We plan to establish Creatio client - Firebase interaction via the Firebase JS SDK to send and receive real time updates. Few clarifications below - 

 

1. Have there been known instances of Creatio successfully integrating with Firebase real time database in the past? If Yes, any available material/documentation around the same would help. 

2. Are there any gotchas or limitations we need to keep in mind from an implementation, security and performance perspectives specific to the Creatio product while integrating with Firebase real time database? Eg with Service workers. 

3. Firebase provides for including the JS SDK via a CDN link. I went through this article on how to include external JS libraries- https://community.creatio.com/questions/how-include-external-js-library-bpmonline. The answer provided seems incomplete/inconclusive. Would appreciate if someone could respond to my query. 

4. Is there a way to directly inject a CDN link globally on Creatio without having to physically include the contents of the file as suggested in the above link?



Thanks in advance!

Shrikanth

Like 0

Like

1 comments

Hello Shrikanth,

Please find my answers bellow:

 

1. We have checked the existing case history but unfortunately didn't find any request related to integration with Firebase service, sorry.

 

2. Unfortunately, we don't have any specific best practices for integrations. It is necessary to use generally accepted engineering practices and instructions but we will happy to assist with any difficulties you may have.

 

3. This question was already answered in the mentioned community post. Duplicating the answer here:

"Please call jQuery.getScript function in the console and review the sources tab as I recommended and use it as an example to add your own jQuery to the system"

 

4. As of now, there is no way to use CDN link in the Creatio application. If it will be available in future releases, you will be able to find this information in the Creatio release notes.

 

Please let us know if you have any other questions.

 

Best regards,

Roman

Show all comments

Hello community!



I have a use case where I need to send a reminder email to all users of a certain organization role at 9 AM their morning as per the timezone they have chosen.

 

I cannot use the Start timer element in the business process as it only lets you choose one timezone and not the user's timezone. 

Like 0

Like

3 comments

Dear Shrikanth,

 

If for example organization role contains 50 users and each user has different timezone (not all of them have the same timezone) you will need to start the process 50 times and distinct "processed" users from "unprocessed". Since the amount of timezones is limited it will be easier for you to tag users who should receive an email by some role or other method and create a separate process for sending emails for each time zone instead of each user. 

 

Best regards,

Angela

Angela Reyes,

Hi Angela. Users can belong to any time zone (There are 110 in total) and new users will get added dynamically with maybe new time zones. Also, the time zone's of users can change depending on the user's global travel. 



Adding one BP per time zone is not maintainable down the line. Can I have one BP which will send Emails as per the time zone of the user?

Is there a way we can write code or use the Quartz.Net scheduler to achieve this?

M Shrikanth,

Usually, it is achievable by timer event but since you have many emails that can be sent in 1 day this cannot be done via one process - only several, according to main time zones (for example). Main timezones are 

From east to west they are Atlantic Standard Time (AST), Eastern Standard Time (EST), Central Standard Time (CST), Mountain Standard Time (MST), Pacific Standard Time (PST), Alaskan Standard Time (AKST), Hawaii-Aleutian Standard Time (HST), Samoa standard time (UTC-11) and Chamorro Standard Time (UTC+10). 

 

If you want to create task in quartz for each timezone it will greatly impact system performance due to the huge amount of data. 

 

Best regards,

Angela

Show all comments

I only have one option to add a date to my section. 

 

The problem is that it shows the date AND the time-

 

I just need the DATE.

 

How do I get just the Date?

 

Thanks for your help!

Heather

 

 

Like 0

Like

2 comments

Hello Heather,

 

Please go to configurations and find the object that represents the section where the date\time field was added. Open this object and find your date\field column there, click on it and select displaying all column properties:

Once done please change the data type to "Date":

and save and publish the object once it is done. As a result you will see only dates in this column.

 

Best regards,

Oscar

Thank You!!!!!

Show all comments

Hi All,

 

Is there any ready-made solution to handle snapshots of sales transaction (like Opportunities and related product data) which should be "freezed" (eg. on demand or recurrently) in case to analyze/compare them in the future ?

 

Regards,

Marcin Kott

Like 0

Like

1 comments

Hello Marcin, 

 

Unfortunately, there is no basic option to "freeze" the information in the CRM system for further comparison. 

 

We recommend using the Change Log functionality to view the changes made to your website's data. 

 

Best regards, 

Olga. 

Show all comments

The documentation shows how to create a multiline field in the List view in mobile app, is it possible to do similar in a detail in mobile?  Is there documentation for Terrasoft.sdk.RecordPage like there is for GridPage?

Like 0

Like

9 comments
Best reply

Glenn Smith,

 

Yes, it is an expected behavior of the application.

 

Best regards,

Norton

Dear Glenn,

 

Unfortunately, there is no documentation for Terrasoft.sdk.RecordPage. However, it is possible to create a multiline text field in a mobile application in the same way as it was shown in Terrasoft.sdk.GridPage documentation.

 

Please find an example of how to add the multiline “Name” field to an edit-page below:

 

Terrasoft.sdk.RecordPage.addColumn('Contact', {

    name: 'Name',

    position: 0,

    isMultiline: true,

    label: 'CustomContactRecordPage_primaryColumnset_Name_label'

});

 

Best regards,

Norton

Norton Lingard,

 

That seems the same as what I tried in a modified version of the mobile detail example, which did not work for me.

 

Terrasoft.sdk.GridPage.setPrimaryColumn("ContactCareer", "Description");

// Adding the [description] column to the primary column collection.

Terrasoft.sdk.RecordPage.addColumn("ContactCareer", {

        name: "Description",

        isMultiline: true,

        position: 1

    }, "primaryColumnSet");

// Delete the [Contact] previous primary column  from the primary column collection.

Terrasoft.sdk.RecordPage.removeColumn("ContactCareer", "Contact", "primaryColumnSet");

Norton Lingard,

Additional update.  It shows about 45 characters on one line followed by ...   If I click again on that text it shows the full multiline text.  Is that expected behavior?

Glenn Smith,

 

Please see a multiline text field on Account edit page, it is the “Name” field. This field is configured in the “MobileAccountModuleConfig” module from the “Mobile” package.

 

Best regards,

Norton

Norton Lingard,

attached are 3 screenshots.  first is the list view with Job Experience detail at the bottom.  Next is after clicking Job Experience detail.  Note that it only shows one line of text.  Third is after I click on the single line text, it shows full multi-line text

Norton Lingard,

second image

Norton Lingard,

third image

Glenn Smith,

 

Yes, it is an expected behavior of the application.

 

Best regards,

Norton

Thanks

Show all comments

Hello, 

 

Would anyone have an example of how they are sending PATCH requests to Creatio?

 

Apparently this does not work, I get the error "{"Message":"There was an error processing the request.","StackTrace":"","ExceptionType":""}"

 

public static void UpdateThingInCreatio(string section, Guid object, Guid idofyetanotherobject, string text1, string text2)
        {
            string data = " somedata";
 
            string requestUri = serverUri + "ActivityCollection(guid'" + objectUID + "')";
            Encoding encoding = Encoding.Default;
            var request = WebRequest.Create(requestUri) as HttpWebRequest;
            request.Method = "PATCH";
            request.ContentType = "application/json; charset=utf-8";
            request.Credentials = new NetworkCredential(username, password);
            byte[] buffer = encoding.GetBytes(data);
            Stream dataStream = request.GetRequestStream();
            dataStream.Write(buffer, 0, buffer.Length);
            dataStream.Close();
            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
            string result = "";
            using (StreamReader reader = new StreamReader(response.GetResponseStream(), System.Text.Encoding.Default))
            {
                result = reader.ReadToEnd();
            }
            MessageBox.Show(dataStream.ToString());

Have looked here: https://documenter.getpostman.com/view/10204500/SztHX5Qb?version=latest#78ea2d20-a8a5-4293-8aa5-0fa694d14d33

 

here:https://community.creatio.com/taxonomy/term/5162

 

and here: https://academy.creatio.com/documents/technic-sdk/7-16/integrations-and-external-api

 

with no luck.

 

Any suggestions or code snipit's are welcome!

Like 0

Like

2 comments

Solved it doing something along the lines of this:



 

using (var httpClient = new HttpClient())
            {
                httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(//Auth here);
 
            using (var request = new HttpRequestMessage(new HttpMethod("PATCH"), requestUri))
                {
                    request.Headers.TryAddWithoutValidation("Accept", "application/json; odata=verbose");
                    request.Headers.TryAddWithoutValidation("ForceUseSession", "true");
                    request.Headers.TryAddWithoutValidation("BPMCSRF", "value");                    
                    request.Content = new StringContent("data");
                    request.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json; odata=verbose");
 
                    var response = await httpClient.SendAsync(request);
                }
            }

If there are any other examples the community would like to share please do here!

Dear Philip,

 

Please find the example of the code below:

 

ExternalRequest.cs

using System;
using System.Net;
using System.IO;
using System.Collections.Generic;
 
namespace ThirdPartyIntegration
{
    class ExternalRequest
    {
        #region Fields: Private
 
        private readonly string appUrl = "http://localhost:3030/";
        private readonly string authServiceUrl = "ServiceModel/AuthService.svc/Login";
        private readonly string OData3ServiceUrl = "0/ServiceModel/EntityDataService.svc/";
 
        private CookieContainer authCookie = new CookieContainer();
 
        #endregion
 
        #region Methods: Private
 
        private HttpWebRequest CreateRequest(string url, string methodType, string requestData = null)
        {
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
            request.ContentType = "application/json;";
            request.Method = methodType;
            request.Accept = "application/json;";
            //request.KeepAlive = true;
            if (!string.IsNullOrEmpty(requestData))
            {
                using (var requestStream = request.GetRequestStream())
                {
                    using (var writer = new StreamWriter(requestStream))
                    {
                        writer.Write(requestData);
                    }
                }
            }
            return request;
        }
 
        // Method realizes protection from CSRF attacks: copies cookie, which contents CSRF-token 
        // and pass it to the header of the next request.
        private void AddCsrfToken(HttpWebRequest request)
        {
            var cookie = request.CookieContainer.GetCookies(new Uri(appUrl))["BPMCSRF"];
            if (cookie != null)
            {
                request.Headers.Add("BPMCSRF", cookie.Value);
            }
        }
 
        private string GenerateRequestData(IDictionary<string, string> columnValuesPairs)
        {
            List<string> data = new List<string>();
            foreach (var pairs in columnValuesPairs)
            {
                data.Add($"\"{pairs.Key}\": \"{pairs.Value}\"");
            }
 
            var massData = data.ToArray();
            return "{ " + string.Join(", ", massData) + " }";
        }
 
        #endregion
 
        #region Methods: Public
 
        public void TryLogin(string userName, string userPassword)
        {
            var authData = "{ " + $"\"UserName\": \"{userName}\", \"UserPassword\": \"{userPassword}\"" + " }";
            var request = CreateRequest(appUrl + authServiceUrl, "POST", authData);
            request.CookieContainer = authCookie;
            // Upon successful authentication, we save authentication cookies for
            // further use in requests to Creatio. In case of failure
            // authentication application console displays a message about the reason
            // of the mistake.
            using (var response = (HttpWebResponse)request.GetResponse())
            {
                using (var reader = new StreamReader(response.GetResponseStream()))
                {
                    var responseMessage = reader.ReadToEnd();
                    if (response.StatusCode == HttpStatusCode.OK)
                    {
                        Console.WriteLine(responseMessage);
                        if (responseMessage.Contains("\"Code\":1"))
                        {
                            throw new UnauthorizedAccessException($"Unauthorized {userName} for {appUrl}");
                        }
 
                        string authName = ".ASPXAUTH";
                        string authCookieValue = response.Cookies[authName].Value;
                        authCookie.Add(new Uri(appUrl), new Cookie(authName, authCookieValue));
                        Console.WriteLine(responseMessage);
                    }
                    else
                    {
                        Console.WriteLine(response.StatusCode + responseMessage);
                    }
                }
            }
        }
 
        public void PatchRequestCreatio(string objectName, Guid objectId, IDictionary<string, string> columnValuesPairs)
        {
            string requestData = GenerateRequestData(columnValuesPairs);
            string finalUrl = appUrl + OData3ServiceUrl + objectName + "Collection(guid'" + objectId + "')";
            var request = CreateRequest(finalUrl, "PATCH", requestData);
 
            request.ContentType += " odata=verbose";
            request.Accept += " odata=verbose";
            request.Headers.Add("ForceUseSession", "true");
 
            request.CookieContainer = authCookie;
            AddCsrfToken(request);
 
            using (var response = (HttpWebResponse)request.GetResponse())
            {
                using (var reader = new StreamReader(response.GetResponseStream()))
                {
                    var responseMessage = reader.ReadToEnd();
                }
 
            }
 
        }
 
        #endregion
    }
}

 

 

Program.cs

using System;
using System.Collections.Generic;
 
namespace ThirdPartyIntegration
{
    class Program
    {
        static void Main(string[] args)
        {
            ExternalRequest request = new ExternalRequest();
            request.TryLogin("UserName", "UserPassword");
 
            string @object = "Account";
            Guid objectId = new Guid("405947D0-2FFB-4DED-8675-0475F19F5A81");
            Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
            keyValuePairs.Add("Fax", "Test");
            keyValuePairs.Add("Code", "111");
 
            request.PatchRequestCreatio(@object, objectId, keyValuePairs);
        }
    }
}

 

Best regards,

Norton



 

Show all comments

When I send the following JSON via DataService it fails:

{"Filters":{"rootSchemaName":"AccountCommunication","logicalOperation":0,"filterType":6,"items":{"filter1":{"LeftExpression":{"ColumnPath":"CommunicationType","ExpressionType":"SchemaColumn"},"ComparisonType":3,"FilterType":4,"RightExpressions":[{"Parameter":{"DataValueType":"Lookup","Value":"2b387201-67cc-df11-9b2a-001d60e938c6"},"ExpressionType":"Parameter"},{"Parameter":{"DataValueType":"Lookup","Value":"6a3fb10c-67cc-df11-9b2a-001d60e938c6"},"ExpressionType":"Parameter"},{"Parameter":{"DataValueType":"Lookup","Value":"9a7ab41b-67cc-df11-9b2a-001d60e938c6"},"ExpressionType":"Parameter"},{"Parameter":{"DataValueType":"Lookup","Value":"ee1c85c3-cfcb-df11-9b2a-001d60e938c6"},"ExpressionType":"Parameter"}]}}},"columns":{"items":{"Account":{"expression":{"columnPath":"Account","expressionType":"0"}},"Number":{"expression":{"columnPath":"Number","expressionType":"0"}},"Id":{"expression":{"columnPath":"Id","expressionType":"0"}}}},"RootSchemaName":"AccountCommunication","OperationType":"0","AllColumns":"false"}

Server returned HTTP response code: 500 for URL: https://esp.bpmonline.com/0/dataservice/json/SyncReply/SelectQuery

This JSON should simply read all AccountCommunication options of types Email, Fax, Phone, AltPhone.

When I remove even just one of the filter expressions (no matter which: Email, Fax, Phone or AltPhone) from the JSON, it runs fine:

{"Filters":{"rootSchemaName":"AccountCommunication","logicalOperation":0,"filterType":6,"items":{"filter1":{"LeftExpression":{"ColumnPath":"CommunicationType","ExpressionType":"SchemaColumn"},"ComparisonType":3,"FilterType":4,"RightExpressions":[{"Parameter":{"DataValueType":"Lookup","Value":"2b387201-67cc-df11-9b2a-001d60e938c6"},"ExpressionType":"Parameter"},{"Parameter":{"DataValueType":"Lookup","Value":"6a3fb10c-67cc-df11-9b2a-001d60e938c6"},"ExpressionType":"Parameter"},{"Parameter":{"DataValueType":"Lookup","Value":"ee1c85c3-cfcb-df11-9b2a-001d60e938c6"},"ExpressionType":"Parameter"}]}}},"columns":{"items":{"Account":{"expression":{"columnPath":"Account","expressionType":"0"}},"Number":{"expression":{"columnPath":"Number","expressionType":"0"}},"Id":{"expression":{"columnPath":"Id","expressionType":"0"}}}},"RootSchemaName":"AccountCommunication","OperationType":"0","AllColumns":"false"}

This doesn't make sense to me.

The error code started to appear about 2 weeks ago. Previously it worked fine.

Like 0

Like

2 comments

Dear Yuriy, 

 

The 500 exception simply means that something is wrong. If you need to see the exact exception message, please open google chrome developers console (Ctr+Shift+I), go to the "Network" tab, catch the request and read a message in the "Response" and "Preview" tabs. 

Please send the text of an error from the  "Response" or "Preview" tabs.

 

Best regards, 

Dennis  

Dennis Hudson,

Thank you for pointing this, however, I don't use a browser for sending the requests, they are sent programmatically. Anyway, I researched the 500 error and it is... 

Maximum number of 20000 records exceeded while loading "AccountCommunication"! How could I not have known! It's obvious by the symptoms. Solved

Show all comments