While configuring OAuth authentication to call external web services, I cannot find a way to set grant_type=client_credentials. Is there a way to make configuration use client_credentials instead of authorization_code grant_type?

I also tried to configure a web service to directly call the IdP access token endpoint passing the grant_type I need, but I was not able to find a way to send the body content-type in application/x-www-form-urlencoded format.

Do you have any suggestions to get the OAuth token using client_credentials?

Like 1

Like

1 comments

Greetings!

There’s no way to get this using the basic method - it doesn’t support sending form requests.
You’ll need to write a task script for that.

It requires writing C# code that uses WebRequest to send the request.
For example:

public bool Execute(UserConnection userConnection)
{
    var tokenUrl = "https://your-creatio-instance.com/connect/token";
    var clientId = "your_client_id";
    var clientSecret = "your_client_secret";
    var request = (HttpWebRequest)WebRequest.Create(tokenUrl);
    request.Method = "POST";
    request.ContentType = "application/x-www-form-urlencoded";
    request.Accept = "application/json";
    var postData = $"grant_type=client_credentials&client_id={HttpUtility.UrlEncode(clientId)}&client_secret={HttpUtility.UrlEncode(clientSecret)}";
    var data = Encoding.UTF8.GetBytes(postData);
    try
    {
        using (var stream = request.GetRequestStream())
        {
            stream.Write(data, 0, data.Length);
        }
        using (var response = (HttpWebResponse)request.GetResponse())
        using (var reader = new StreamReader(response.GetResponseStream()))
        {
            var responseText = reader.ReadToEnd();
            var tokenResponse = JsonConvert.DeserializeObject<OAuthTokenResponse>(responseText);
            // if you want you can do something with tokenResponse.access_token            
            return true;
        }
    }
    catch (WebException ex)
    {
        if (ex.Response != null)
        {
            using (var reader = new StreamReader(ex.Response.GetResponseStream()))
            {
                var errorText = reader.ReadToEnd();
                // Here also you can log the error or display it
                Console.WriteLine("OAuth error: " + errorText);
            }
        }
        else
        {
            Console.WriteLine("WebException without response: " + ex.Message);
        }
        return false;
    }
}

Regards, 
Orkhan

Show all comments

Hello Community,

I'm working on a login page and want to make the password field secure by hiding the input characters (so that they appear as "**" or dots).


What is the best way to do this in Freedom UI?

Any help or code examples would be appreciated. Thanks in advance!

Like 0

Like

1 comments

Open the code for the page and locate the Password field in the viewConfigDiff. Change the line: 

"type": "crt.Input"

To the following: 

"type": "crt.PasswordInput"

Ryan

Show all comments

Hello, is it possible to post a feed in a section record, for example an opportunity record, and this feed is only visible to the @mentioned user, but not all the users who have read access to that opportunity record?

Like 0

Like

2 comments

Hi Andrew, were you able to achieve this?

No, that's why I asked here.

Show all comments

How to add  remark option in approval section of creatio. Also we need to add return button. Any way to do it in mobile version also

 

Like 0

Like

1 comments

Hello.

Currently, there is no built-in remark functionality for approvals in the product.

However, you can achieve your business goal by creating a custom business process that is triggered when an approval is rejected. This process can be configured to implement any follow-up actions based on your specific business logic.

For guidance on how to set up such a process, we recommend reviewing the following articles:
https://academy.creatio.com/docs/8.x/no-code-customization/bpm-tools/process-elements-reference/user-actions/approval-process-element
https://academy.creatio.com/docs/8.x/no-code-customization/category/business-process-setup
https://academy.creatio.com/docs/8.x/no-code-customization/category/process-administration

Additionally, we have created a task for the R&D team to review the possibility of adding such functionality in the future releases.

Best regards,
Antonii
 

Show all comments

Hi All, 

Would you please advise if it's feasible to recreate the logic used for Leads / Opportunities and have a custom object with a workflow where stages history would be recorded and displayed in the sales funnel dashboard? 

How difficult such task would be and how to approach this? 

Any advice would be much welcome! 

Thank you!
Jacek 

Like 1

Like

2 comments

Hi,

Yes, it is feasible to recreate the logic used for Leads/Opportunities by implementing a custom object with a workflow that records stage history. You can create a separate object to store the stage history and configure a process that automatically creates a record each time the stage of the main custom object changes.

However, please note that the standard Sales Funnel dashboard in Creatio is designed to work with standard entities such as Leads and Opportunities. Custom objects are not supported out-of-the-box in this dashboard. To include data from a custom object in a funnel visualization, custom development will be required. This could involve creating a custom dashboard widget or a report using the Analytics section.

Best regards,
Anton

Thanks Anton!

I think it'd good if Creatio developing the AI for system customizations would look into creating a flow that automatically sets or gives a possibility to set these 'additional components' like Stages history, Days per stage calculation, and a custom sales funnel based on that initial custom object. 

Just some food for thought :-) 

Thank you for your answer! It's much appreciated. 

Show all comments

I've used following article to create Business process to send push notifications:
https://academy.creatio.com/docs/8.x/no-code-customization/bpm-tools/bpm-process-examples/set-up-push-notifications-for-mobile-users

Goal of Business process is to send Push notifications to mobile app about calendar Activities for Owners:

 

  1. Run every 15 minutes (don't know if we can use some Signals based on Activitiy Start time, so decided to run every 15 minutes and check for Activities within next 15 minutes, which is also fine for us)
  2. So next setting Start and End dates within next 15 minutes interval
  3. Then Read Activitiy records (collection)

     

  4. and then Send push notification
     

  5. Issue is than I cannot pass Recepient User, as Owner of activity is Contact, but User is expected

 

So looking for your help:
1) How to pass respective User for collection of records?

Owner is not available for selection

2) Is it possible to send to multiple users (dynamically defined Owner from Read Collection and static Manager defined manually in Business Process)?

3) How to pass Lead_Name (text) or Lead_Status (lookup) to "Push notification text", instead of Lead_ID? ( I know how to handle this with Read single first record, to Read Lead Data and filter by Lead ID, but don't know how to handle such cases for Collection of records)

 

Huge thanks,

Leo

Like 1

Like

4 comments
Best reply

As far as getting the user for each contact, you could do this by creating another process inbetween the two. Create a subprocess and add parameters for the columns you want to include in the push notification (subject, lead, start, and contact). In this subprocess, you would read System Administration Unit (user) for the contact passed, then pass the values including the user to the Send Push Notification subprocess. In the main process, you'd change things so after reading the activities for the time period as a collection, you'd pass each to this new subprocess, and it would read the user for the contact and call the subprocess to send the push notification.

Ryan

As far as getting the user for each contact, you could do this by creating another process inbetween the two. Create a subprocess and add parameters for the columns you want to include in the push notification (subject, lead, start, and contact). In this subprocess, you would read System Administration Unit (user) for the contact passed, then pass the values including the user to the Send Push Notification subprocess. In the main process, you'd change things so after reading the activities for the time period as a collection, you'd pass each to this new subprocess, and it would read the user for the contact and call the subprocess to send the push notification.

Ryan

it works, huge thanks!

Is it possible to pass 2 or more users to singe Push notification subprocess?

Or should I use similar approach and create a fork (AND) in business process to call Push notification subprocess in case I need to sent the same Push notification to 2 or more persons?

Leonid,

You'd have to call that subprocess twice, once for each user.

thanks!

Show all comments

Hello,

I tried to change the width of one of my Freedom UI mini pages, by adding the code below to the page. When I opened from the designer, it has the width that I want for a few seconds before changing back to the default width. What I'm missing?

Thanks,

Jose

 

          {
                "operation": "merge",
                "name": "Main",
                "values": {
                    "fitContent": true,
                    "layoutConfig": {
                        "width": 840
                    }
                }
            },

 

Like 0

Like

2 comments
Best reply

There's a feature you can add/enable called "EnabledAppearanceSettings" that turns on the ability to choose different sizes for the modal/mini pages. See more here: https://customerfx.com/article/changing-the-size-of-freedom-ui-modal-mi…

  1. Go to https://[creatiourl/0/flags
  2. Search to see if you have the feature named "EnabledAppearanceSettings" (you won't have it, but just to make sure. If not, click Add to add it, enter:
    1. Code = EnabledAppearanceSettings
    2. Enabled = checked
    3. Save, then click Clear Cache
  3. Now when you open the designer for a modal/mini page, you'll see some size options

Ryan

There's a feature you can add/enable called "EnabledAppearanceSettings" that turns on the ability to choose different sizes for the modal/mini pages. See more here: https://customerfx.com/article/changing-the-size-of-freedom-ui-modal-mi…

  1. Go to https://[creatiourl/0/flags
  2. Search to see if you have the feature named "EnabledAppearanceSettings" (you won't have it, but just to make sure. If not, click Add to add it, enter:
    1. Code = EnabledAppearanceSettings
    2. Enabled = checked
    3. Save, then click Clear Cache
  3. Now when you open the designer for a modal/mini page, you'll see some size options

Ryan

Ryan Farley,

Thanks. That's exactly what I was looking for.

Show all comments

Hello Community,

I would like to know how to skip the warning message that appears when closing a page using a handler.

Currently, I’m using the following code to close the page:

 await request.$context.executeRequest({
  type: "crt.ClosePageRequest",
  $context: request.$context
 });

regards,

Ajay Kuthe.

Like 0

Like

1 comments
Best reply

There is a request called "crt.CanDiscardUnsavedDataRequest" that you can handle to suppress that. See here: https://customerfx.com/article/suppressing-the-unsaved-data-prompt-when-canceling-a-creatio-freedom-ui-modal-dialog/

Ryan

There is a request called "crt.CanDiscardUnsavedDataRequest" that you can handle to suppress that. See here: https://customerfx.com/article/suppressing-the-unsaved-data-prompt-when-canceling-a-creatio-freedom-ui-modal-dialog/

Ryan

Show all comments

Hello Community,

I would like to know how to skip the warning message that appears when closing a page using a handler.

Currently, I’m using the following code to close the page:

 await request.$context.executeRequest({
  type: "crt.ClosePageRequest",
  $context: request.$context
 });

regards,

Ajay Kuthe.

Like 0

Like

1 comments

I am having issues creating a data item for data stored in an object I created. I am not sure why I am having this issue. I have a data item for the Union lookup and the Union lookup values. I attached an image for reference.



Like 0

Like

2 comments

This is telling you that the record you’re binding references a record in UsrEmployeeJobHistoryUnion with the Id in the message and that record is not bound in the package. To fix, bind data from UsrEmployeeJobHistoryUnion and add that record. 
Ryan

Hi Ryan,

I'm also facing the same issue while binding lookup. In my case, I have tried to create 1:1 relationship between lookups.

Service Type Lookup:
Service Type Lookup

Service Sub Type:
Service SubType Lookup

So while binding these lookups, I'm getting the following error:

Error: Service Type Lookup
Error: Service SubType Lookup

Query:
1. Is there any way to resolve above problem?
2. Is 1:1 relationship is correct?
 

Show all comments