Hi Community, 

 

I have to use Odata of Creatio environment from Postman using OAuth 2.0 authentication. For that, I have followed a Tech hour session of Creatio Trainers.

Tech Hour - Integrate like a boss with Creatio, part 2 (Odata)

 

But, while generating token at 38:10, I am not getting token in a response instead of that I am getting some HTML code like below.

 

 

Please suggest and help how to get token and if I am missing something. :)

Thanks in Advance.

Like 0

Like

4 comments

Hi Patrik,

 

Can you please provide a complete HTML-code from the response? There should be some description of the response at the bottom.

 

Best regards,

Oscar

Hi Oscar,

 

Below is the complete HTML-code.

 

<!DOCTYPE html

    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" culture="en-US">

 

<head>

    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />

    <meta name="fontiran.com:license" content="LAXSN" />

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>

        Creatio

    </title>

    <style>

        .font-preload {

            position: absolute;

            opacity: 0;

        }

 

        .font-preload-open-sans {

            font-family: "Bpmonline Open Sans";

        }

 

        .font-preload-open-sans-light {

            font-family: "Bpmonline Open Sans Light";

        }

 

        .font-preload-open-sans-bold {

            font-family: "Bpmonline Open Sans Bold";

        }

    </style>

    <script type="text/javascript">

        Terrasoft = window.Terrasoft || {};

Terrasoft.appFramework = "NETFRAMEWORK";

Terrasoft.coreVersion = "7.18.5.1500";

Terrasoft.useClientPerformanceLogger = false;

Terrasoft.configuration = Terrasoft.configuration || {};

Terrasoft.configuration.Structures = Terrasoft.configuration.Structures || {};

Terrasoft.useParallelSchemaBuilding = true;

Terrasoft.showSessionEndNotification = false;

Terrasoft.useWebSocketKeepAlive = true;

Terrasoft.useStaticFileContent = true;

Terrasoft.usePackageFileContent = true;

Terrasoft.useGenerateModulePathes = true;

Terrasoft.useNewRightsManagement = true;

Terrasoft.useOffsetFetchPaging = false;

Terrasoft.useMarkerValue = true;

Terrasoft.enablePerformanceManager = false;

Terrasoft.useSecureSettingsOnClient = false;

Terrasoft.useSchemaUniqueNameRandomGenerator = true;

Terrasoft.disableAspxErrorPage = true;

Terrasoft.useAsyncStaticContentGeneration = true;

var FileAPI = {

    staticPath: "https://050800-studio.creatio.com//Resources/ui/FileAPI/",

    flashUrl: "https://050800-studio.creatio.com//Resources/ui/FileAPI/FileAPI.flash.s…",

    flashImageUrl: "https://050800-studio.creatio.com//Resources/ui/FileAPI/FileAPI.flash.i…" };

Terrasoft.storesConfig = [];

Terrasoft.storesConfig.push({levelName: 'ClientPageSession', type: 'Terrasoft.MemoryStore', isCache: true});

Terrasoft.storesConfig.push({levelName: 'Domain', type: 'Terrasoft.LocalStore', isCache: true});

if(Terrasoft.StoreManager){

    Terrasoft.StoreManager.registerStores(Terrasoft.storesConfig);

}

Terrasoft.loaderBaseUrl = "https://050800-studio.creatio.com/";

Terrasoft.workspaceBaseUrl = "https://050800-studio.creatio.com/";

Terrasoft.coreModulesPath = 'core/hash/';Terrasoft.app = Terrasoft.app || {};

Terrasoft.app.config = Terrasoft.app.config || {};

Terrasoft.app.config.staticFileContent = Terrasoft.app.config.staticFileContent || {};

Terrasoft.app.config.staticFileContent.imagesRuntimePath = 'conf/content/img';

Terrasoft.app.config.staticFileContent.schemasRuntimePath = 'conf/content';

Terrasoft.app.config.staticFileContent.resourcesRuntimePath = 'conf/content/resources';



 

Terrasoft.showSelfRegistrationLink = true;

    </script>

    <script type="text/javascript">

        window.workspaceCount = 0;

window.supportInfo = [];

window.supportInfoCaption = 'Technical support';

window.importantLinks = [];

window.importantLinksCaption = 'Important links';

window.productVersion = '7.18.5.1500';

window.loginTimeout = '30000';

var Terrasoft = Terrasoft || {};

window.isNtlmLoginVisible = false;

window.isOpenIdLoginVisible = false;

window.loginPageWidgetInfo = {visible: true, src: 'https://www.bpmonline.com/page/creatio/widget'}

window.unsupportedBrowserInfo = { visible: true }

window.loginImageUrl = '/terrasoft.axd?s=nui-binary-syssetting&r=LogoImage&source_hash=98b1b8112110361c36b8ab70d88db296';

window.productVersion = '7.18.5.1500';

    </script>

    <script type="text/javascript"

        src="https://050800-studio.creatio.com//core-sl/851526dc5db90435038b708f7ad9…"></script>

    <script type="text/javascript">

        Terrasoft.loginUrl = 'https://050800-studio.creatio.com/ServiceModel/AuthService.svc/Login';

Terrasoft.ntlmLoginUrl = 'https://050800-studio.creatio.com/Login/NuiLogin.aspx?ntlmlogin';

Terrasoft.changePasswordUrl = 'https://050800-studio.creatio.com/ServiceModel/AuthService.svc/DoChange…';

Terrasoft.simpleLoginTag = "simplelogin";

Terrasoft.loginModulePath = 'https://050800-studio.creatio.com//core/cab68cf981c5c57700bb51729bd6695…';

    </script>

    <script type="text/javascript"

        src="https://050800-studio.creatio.com//core/db7fe0930e6258f01fb73405039cc9a…">

    </script>

    <script type="text/javascript"

        src="https://050800-studio.creatio.com//core/a2de79ad7a40d8fc81723c5ec4924f6…">

    </script>

    <script type="text/javascript">

        Terrasoft.configurationContentHash = "e5c44fb36af042b9bd061eabf982e95f";

Terrasoft.fileContentDescriptorsFileExists = true;

Terrasoft.fileContentBootstrapsFileExists = true;

Terrasoft.currentUserCultureName = "en-US";

    </script>

    <script type="text/javascript"

        src="https://050800-studio.creatio.com//core/82582be2ea4244b8799f21ef78fd6a7…">

    </script>

    <link rel="stylesheet" type="text/css"

        href="https://050800-studio.creatio.com//core/618184e4bd438f8c5e43aa74aff1464…" />

    <link href="../terrasoft.axd?s=nui-binary-syssetting&r=FaviconImage&source_hash=b05a750c6b433c4fc47050e3d539139e"

        rel="shortcut icon" type="image/vnd.microsoft.icon" />

    <script type="text/javascript"

        src="https://050800-studio.creatio.com//core/057665f97324038f6c7c326b6734de6…"></script>

    <script type="text/javascript">

        requirejs.config({

    'paths': {

        'require-config': 'https://050800-studio.creatio.com//core/c3b382519da9b15e207de6d13b5f07b…',

        'require-url-config': 'https://050800-studio.creatio.com//core/967b00f40245f346c0fb1e09d597be5…',

        'core-base': 'https://050800-studio.creatio.com//core/d17ef52258a059bbfe965f70e14a892…',

        'bootstrap': 'https://050800-studio.creatio.com//core/6290cba0af7874034f1ec28936bca13…',

        'performanceLogger': 'https://050800-studio.creatio.com//core/cf23c4ee65b1c47840a78249f048d9e…',

        'performancecountermanager': 'https://050800-studio.creatio.com//core/e79de66acd39442acc1377a3c171086…',

        'rxjs': 'https://050800-studio.creatio.com//core/3af6aa89d5864381a3fd9f1fe6785da…',

        'process-designer-component': 'https://050800-studio.creatio.com//core/5119e9df4aca8914fabf4effd4b3ee4…',

        'voice-to-text-component': 'https://050800-studio.creatio.com//core/9df4cfbb9e9b64ef08efce6d7b673e3…',

        'jQuery': 'https://050800-studio.creatio.com//core/f7072c6fb890cf46ab0e415e1c5edc0…',

        'ckeditor-base': 'https://050800-studio.creatio.com//core/35294e09797b9d02519ddb8ec253cc6…',

        'html2canvas': 'https://050800-studio.creatio.com//core/6bd482f253bafa6d551a21a9d1c5158…',

        'login-view-utils': 'https://050800-studio.creatio.com//core/dac89c851a756ef023c909a162fe1bd…',

        'configuration-loader': 'https://050800-studio.creatio.com//core/2a08fc37afe007049254c67723a07b7…',

        'configuration-bootstraps': 'https://050800-studio.creatio.com//core/0b716942a363fd530c825a6916ea3eb…',

        'loadbootstrap': 'https://050800-studio.creatio.com//core/fb69c3378bd3bdd1dcaab52942c87fa…',

        'chartjs': 'https://050800-studio.creatio.com//core/35da68cdf95e9468e2d8a3402ba2990…',

        'chartjs-label': 'https://050800-studio.creatio.com//core/0465154f993989d21ccc58b60b5eff8…',

        'chartjs-defaults': 'https://050800-studio.creatio.com//core/f5dcdb1296b21c01cb66773578fcdbd…',

        'chartjs-funnel': 'https://050800-studio.creatio.com//core/1d50b71dc2141b3e6bf11233f3110a0…',

        'chartjs-gauge': 'https://050800-studio.creatio.com//core/c69beeddee9d58074a185ac35ead686…',

        'user-agent': 'https://050800-studio.creatio.com//core/7b46df63a446479bad7a010aefae6d4…',

        'user-agent-parser': 'https://050800-studio.creatio.com//core/796eff62f0f726654cfc29d4a77df33…',

        'ng-core': 'https://050800-studio.creatio.com//core/6cb28d63fbb28f9a3377feea3f9d820…',

        'ng-loader': 'https://050800-studio.creatio.com//core/6eada957e17a6e76a7090421502adbb…',

        'ng-scripts': 'https://050800-studio.creatio.com//core/30950c16db19b349981dd6cd0b66a3b…',

        'ng-polyfills-es5': 'https://050800-studio.creatio.com//core/83382b3fa36e6adf19d56492fa6ed49…',

        'ng-polyfill-webcomp': 'https://050800-studio.creatio.com//core/ba560325babea1d1f73bcc2b076e626…',

        'numeral': 'https://050800-studio.creatio.com//core/b3ac42fc2efdd8256803f41aab70211…',

        '@creatio/sdk': 'https://050800-studio.creatio.com//core/091860f68bd3d2e237f482f14c45829…'

    },

    'shim': {

        'chartjs-label': {

            'deps': [

                'chartjs'

            ]

        },

        'chartjs-defaults': {

            'deps': [

                'chartjs-label'

            ]

        },

        'chartjs-funnel': {

            'deps': [

                'chartjs'

            ]

        },

        'chartjs-gauge': {

            'deps': [

                'chartjs'

            ]

        },

        'user-agent': {

            'deps': [

                'user-agent-parser'

            ]

        },

        'ng-core': {

            'deps': [

                'ng-loader'

            ]

        },

        'ng-loader': {

            'deps': [

                'ng-scripts'

            ]

        },

        'ng-scripts': {

            'deps': [

                'ng-polyfills-es5',

                'ng-polyfill-webcomp'

            ]

        },

        'process-designer-component': {

            'deps': [

                'ng-core'

            ]

        },

        'voice-to-text-component': {

            'deps': [

                'ng-core'

            ]

        }

    }

});

require(['loadbootstrap'], function() {});

    </script>

    <script type="text/javascript"

        src="https://050800-studio.creatio.com//core/f7072c6fb890cf46ab0e415e1c5edc0…"></script>

    <script type="text/javascript">

        console.warn('Creatio Debug mode is OFF. To switch ON use following code');

console.log('Terrasoft.SysSettings.postPersonalSysSettingsValue("IsDebug", true)');

Terrasoft.isDebug = false;

    </script>

    <script type="text/javascript">

        Terrasoft.DataValueTypeRange = {INTEGER: {maxValue:2147483647,minValue:-2147483648},FLOAT: {maxValue:79228162514264337593543950335,minValue:-79228162514264337593543950335},DATE_TIME: {maxValue:"9999-12-31T23:59:59.999",minValue:"0001-01-01T00:00:00.000"}};

    </script>

    <script type="text/javascript">

        Terrasoft.isSspInReadonlyMode = false;

    </script>

    <script type="text/javascript">

        let authErrorExceptions = Terrasoft.AuthErrorExceptions = {};

authErrorExceptions[4] = 'Access denied. Contact your system administrator';

authErrorExceptions[5] = 'Your password has expired. Re-set your password';

authErrorExceptions[10] = 'Time zone is invalid.';

authErrorExceptions[0] = 'Authorization failed';

    </script>

</head>

 

<body>

    <div class="font-preload">

        <span class="font-preload-open-sans">_</span>

        <span class="font-preload-open-sans-light">_</span>

        <span class="font-preload-open-sans-bold">_</span>

    </div>

    <form name="IndexForm" method="post" action="./NuiLogin.aspx?ReturnUrl=%2fconnect%2ftoken" id="IndexForm">

        <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="eMuh9ihakhnX/zUqq7lTE6+Qjxg4SzesoxXF7ONcAMizlm2gDp+Gio00ugTgWm/AlwErvFthXa/vJl5/6RJTQJDAIj954pdUbX8rQ4ykxxFP9iqA" />

 

        <input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="0BFA92C5" />

    </form>

</body>

 

</html>

Pratik Sanghani,

 

Thank you! This message is usually returned in case you are not authenticated. Did you use UserName and UserPassword as a ClientId and ClientSecret and used Basic Auth? And also are you passing a form-data grant_type key in the headers and also using the identity service URL as an endpoint to send request?

 

Best regards,

Oscar

Oscar Dylan,

 

Thank you for the Help. It is working fine for me as well. I was not using the identity service URL as an endpoint earlier. :)

Show all comments

Hi Community,

 

I was trying to build one scenario - On Error come during process execution i.e. System shows Error in Process Log Section, I want to log it in another Custom section and Create new record there. 

For this, I created a business process that can be triggered on the Change in Process Log Object. But that process is not getting triggered. Please guide me here? How to do it correctly?

 

Like 0

Like

3 comments

Dear Pratik,



Please note that our application doesn't support designing business processes that are triggered by a modification in system objects. The core of business process mechanisms works on low-level API which doesn't support start signal's functionality. This is done in order to avoid any kind of accidents with business process mechanisms and also for performance maintaining reasons.

 

However, you can try designing a process that runs, for example, every day and checks Process log records for errors, and then sends this information to a specific mailbox.

 

Kind regards,

Mira

Hi Pratik,

I had a similar issue, and that's the solution I came up with: 

My process is scheduled to run every 4 hours and the read data searches for process marked with the "Error" status, which name starts with a custom prefix (that I assigned to identify my processes). The subprocess is used to log the error in another custom section.

Hope it helps! 

Hi Mira and Federica Cattani,



Thanks for the help and explanation. 

Show all comments

Hello,

I am trying to validate a record before it gets inserted into the DB using entity events layer :  public override void OnInserting(object sender, EntityBeforeEventArgs e);

 

If the validation fails, I would like to display a message to the user. Is there a built in method like set validation message or something? I understand this can be done through Web socket but I would prefer if I am able to use a built in validator.

 

Thanks

Like 0

Like

2 comments
Best reply

Hello Shivani,

You can simply throw an exception from the event and it will halt the insert process and display the exception message to the user.

An an example, this OnInserting event checks to ensure the Also known as field is not empty:

using System;
using Terrasoft.Core.Entities;
using Terrasoft.Core.Entities.Events;
 
namespace FX.EntityEventListeners
{
    [EntityEventListener(SchemaName = "Account")]
    public class UsrAccountEntityEvents : BaseEntityEventListener
    {
        public override void OnInserting(object sender, EntityBeforeEventArgs e)
        {
            base.OnInserting(sender, e);
            var account = (Entity)sender;
 
            if (string.IsNullOrEmpty(account.GetTypedColumnValue&lt;string&gt;("AlternativeName"))) 
            {
                throw new Exception("Also known as cannot be blank");
            }
        }
    }
}

This displays this message when the user inserts an account without this field populated:

Ryan

Hello Shivani,

You can simply throw an exception from the event and it will halt the insert process and display the exception message to the user.

An an example, this OnInserting event checks to ensure the Also known as field is not empty:

using System;
using Terrasoft.Core.Entities;
using Terrasoft.Core.Entities.Events;
 
namespace FX.EntityEventListeners
{
    [EntityEventListener(SchemaName = "Account")]
    public class UsrAccountEntityEvents : BaseEntityEventListener
    {
        public override void OnInserting(object sender, EntityBeforeEventArgs e)
        {
            base.OnInserting(sender, e);
            var account = (Entity)sender;
 
            if (string.IsNullOrEmpty(account.GetTypedColumnValue&lt;string&gt;("AlternativeName"))) 
            {
                throw new Exception("Also known as cannot be blank");
            }
        }
    }
}

This displays this message when the user inserts an account without this field populated:

Ryan

 

Thanks Ryan! This works!

Show all comments

I'm looking to see if Creatio supports the concept of Sub-Orders. In this case, a "master order" would be linked to two or more other orders. The Master Order would be basically readonly and the product line items and discounts would be automatically updated with suborder line items and discounts as the suborders were updated.

 

The use case we have is when a customer needs two separate invoices for products (due to customer invoicing restrictions) but the implementation team needs the orders combined into a single work order.

Like 1

Like

0 comments
Show all comments

I have a prospect whose business generates 1-2 million new records/month.  They need to retain and search ~200M records.  Does anyone have experience or benchmarks scaling Creatio to similar data volumes?

Like 0

Like

2 comments

Hi Glenn, 



There are no strict limits for the records possibly can be added in Creatio. 



If we speak about the in-site deployed system , then the main point is to correctly treat and maintain the database in order to keep it's health and performance on the required level - create indexes and so on.



Kind regards,

Roman . 

 

Roman Brown,

This would be hosted by Creatio, not the customer.  While I agree there is no hard limit, what are the performance implications of very large databases?  Does Creatio create the indices as you recommend for a customer hosted solution?

Show all comments

Hi Community,

I am trying to make a request from Creatio to the HTTP REST API Endpoints. |Where File should be added to the API request. 

Is there any way to work with the File type request Parameter in Rest API from Creatio? If yes, please suggest to me how I can achieve this.

 

An example of an API call from Postman is something like as per below :

 

Like 0

Like

3 comments

Hi Patrik,

 

To successfully upload an image you need to make sure that "WebDav publishing" feature is disabled in Windows features of the IIS server (can be found at "World wide web services" -> "Common HTTP Features" -> "WebDAVPublishing"):

Once done you need to perform the following steps:

 

1) Create a POST request to https://app_root_URL/0/odata/SysImage with the JSON raw body with the following content:

{
    "Name": "scr_NewContactPhoto.png",
    "Id": "330006E1-CA4E-4502-A9EC-E54D922D2C01",
    "MimeType": "image/png"
}

330006E1-CA4E-4502-A9EC-E54D922D2C01 should be a random unique identifier. This request will create a record in the SysImage table and the response should be similar to the below:

{
    "@odata.context": "https://app_root_URL/0/odata/$metadata#SysImage/$entity",
    "Id": "330006e1-ca4e-4502-a9ec-e54d922d2c01",
    "CreatedOn": "2021-09-30T10:24:26.830457Z",
    "CreatedById": "410006e1-ca4e-4502-a9ec-e54d922d2c00",
    "ModifiedOn": "2021-09-30T10:24:26.830457Z",
    "ModifiedById": "410006e1-ca4e-4502-a9ec-e54d922d2c00",
    "ProcessListeners": 0,
    "UploadedOn": "0001-01-01T00:00:00Z",
    "Name": "scr_NewContactPhoto.png",
    "Data@odata.mediaEditLink": "SysImage(330006e1-ca4e-4502-a9ec-e54d922d2c01)/Data",
    "Data@odata.mediaReadLink": "SysImage(330006e1-ca4e-4502-a9ec-e54d922d2c01)/Data",
    "Data@odata.mediaContentType": "application/octet-stream",
    "MimeType": "image/png",
    "HasRef": false,
    "PreviewData@odata.mediaEditLink": "SysImage(330006e1-ca4e-4502-a9ec-e54d922d2c01)/PreviewData",
    "PreviewData@odata.mediaReadLink": "SysImage(330006e1-ca4e-4502-a9ec-e54d922d2c01)/PreviewData",
    "PreviewData@odata.mediaContentType": "application/octet-stream"
}

2) Create a PUT request to https://app_root_URL/0/odata/SysImage(330006e1-ca4e-4502-a9ec-e54d922d2c01)/Data with the binary body and select an image there:

Once executed the response will be 200OK.

 

And after that we can perform a GET request to check the result:

Please also note that BPMCSRF cookie should be always in headers:

Best regards,

Oscar

Hi Oscar,

Thanks for the Guidance, But I want to make an API call from Creatio itself ( Using Web-Service / Script Task ), not from Postman

 

Could you guide me on that? 

Hi Pratik,

 

Please see examples here https://academy.creatio.com/docs/developer/integrations_and_api/data_se…

 

Best regards,

Oscar

Show all comments

Hello Team,

 

There is any way to edit the fields to display in the mobile section? In the web I change the behavior of the field in the object and is hidden but didn't work on the mobile.

 

 

Like 0

Like

3 comments

Hello Federico, 

 

Actually this is the out-of-the box logic and it's not possible to hide these columns. Nevertheless, you are welcome to use the "Search for filter column" option that was developed to find the needed filter column fast.

 

Best Regards, 

 

Bogdan L.

Bogdan Lesyk,

 

Thanks Bogdan.

 

Would be great if the mobile is taking the behavior configuration of the object like in the web version. 

Federico Buffa ...,

 

For sure! 

 

That's a great idea and will be definitely passed to our Core R&D team.

 

Thanks!

 

Regards, 

 

Bogdan L.

Show all comments

I'm calling REST api of Contact ,Account and Case management for CRUD operation. I'm calling Creatio CRM REST from WSO2 EI. It is identical the Request which is send from the Postman or Rest Client.

But it gives 302 Status for WSO2 EI calling the  Creatio REST while it gives 403 for Postman or Restclient If BPMCSRF header doesn't contain cookie value.

 

If the BPMCSRF header value contains correct cookie value from the Login request, Postman or Restclient gives 201/200 for success operation and WSO2 EI gets same 302 response.  Login API call working fine from the WSO2 EI. 

 

Sample Request from WSO2 EI

"POST /0/odata/Account HTTP/1.1[\r][\n]"

"Accept: application/json;odata=verbose[\r][\n]"

"X-Requested-With: XMLHttpRequest[\r][\n]"

"ForceUseSession: true[\r][\n]"

"Content-Type: application/json[\r][\n]"

"Content-Length: 228[\r][\n]"

"Host: 103594-crm-bundle.creatio.com[\r][\n]"

"Connection: Keep-Alive[\r][\n]"

"User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]"

"[\r][\n]"

"{"Name":"API Test","AccountId":"e6574af1-3e92-4099-958e-e798f52ee016","JobTitle":"Marketing manager","BirthDate":"0001-01-01T00:00:00Z","Phone":"","MobilePhone":"+1 213 566 34 22","Email":"test@gmail","Completeness":30,"Age":19}"

 

Sample Response from Creatio 

 

"HTTP/1.1 302 Found[\r][\n]"

"Server: nginx/1.14.1[\r][\n]"

"Date: Thu, 16 Sep 2021 06:21:05 GMT[\r][\n]"

"Content-Type: text/html; charset=utf-8[\r][\n]"

"Content-Length: 170[\r][\n]"

"Connection: keep-alive[\r][\n]"

"Cache-Control: private[\r][\n]"

"Location: /Login/NuiLogin.aspx?ReturnUrl=%2f0%2fodata%2fAccount[\r][\n]"

"X-AspNet-Version: 4.0.30319[\r][\n]"

"X-Powered-By: ASP.NET[\r][\n]"

"X-Frame-Options: SAMEORIGIN[\r][\n]"

"X-Content-Type-Options: nosniff[\r][\n]"

"[\r][\n]"

"Object moved[\r][\n]"

"

Object moved to here.

[\r][\n]"

"

.

Like 0

Like

7 comments

It means that you are not authenticated properly in the application (see location part  "/Login/NuiLogin.aspx?ReturnUrl=%2f0%2fodata%2fAccount", you were redirected to the login page). You need to check all the cookies that are passed to the OData request that you send and compare it with cookies you get in Postman + perform more tests to see which cookie set will result in a successful call.

Oscar Dylan,

If the authentication error, it should be 401 or 403 status. But here it is always redirect to login page with 302. verified the headers from Postman and client app both, those are identical. 

Anusha,

 

That is correct - the resource was found, but you need to authenticate first (once again, pay attention to the location path /Login/NuiLogin.aspx?ReturnUrl=%2f0%2fodata%2fAccount). The system automatically redirected you to the login location.

 In Postman you receive 200 OK to the request, but before it you receive 302 response (can check in the Postman console):

Hi Oscar,

 

Thank you very much for the information, but still I'm confused authentication approach. This is what I'm doing.

 

When I get 302 for Contact endpoint, then I perform the authentication to  auth endpoint  POST call <Creation-app-host>/ServiceModel/AuthService.svc/Login with the body [1]. Then I see cookies details in the response with BPMCSRF cookie with 200 response.  Then I send again the Contact endpoint with those auth cookies, [2]  are the headers which I send to Contact endpoint again. But still same 302 redirection is there even after successful authentication. 

 

Could you please help me on this.

--- does the above approach wrong

--- does the auth headers wrong mentioned in [2]

 

If above approach wrong, please help me to find request format from the client application to complete the successful Contact create through the  client.

 

[1] body

{

   "UserName":"xxxxxxxxx",
   "UserPassword":"xxxxxxx"
}

 

[2] . Headers

 

Accept: application/json;odata=verbose[\r][\n]"

"BPMCSRF: cvHrL0GEHYdswl1QZh8Ie.[\r][\n]"

"ForceUseSession: true[\r][\n]"

"Set-Cookie: .ASPXAUTH=F82E.... "

"Set-Cookie: BPMCSRF=cvHrL0GEHYdswl1QZh8Ie."

"Set-Cookie: BPMLOADER=zchmt5tlzildsx22zlle1wnk"

"Set-Cookie: UserName=93|117|112|101|114|118|105|115|101|114"

"Content-Type: application/json; charset=utf-8[\r][\n]"

"Content-Length: 228[\r][\n]"

"Host: 103594-crm-bundle.creatio.com[\r][\n]"

"Connection: Keep-Alive[\r][\n]"

"User-Agent: Synapse-PT-HttpComponents-NIO"

 

Hi Anusha,

 

Unfortunately you have to run test and find a way to pass the cookies to the request properly in terms of your integration. For example I have this cookie header in Postman:

 

BPMSESSIONID=xjjysy25na5ig5sqbgdyxd14; visid_incap_2180455=49BJJNmNT1uK2vo4spt1YM3yQWEAAAAAQUIPAAAAAAB7xEOk/CkixDKkf1pVpwRW; .ASPXAUTH=0129CAB95F4B3C753B6B00E3BBC7F15E9F0CF094A9209DCC541E033D963163699488F8A6AF3F3F845BABCA582CE603AD00E4AC3EE005216347F4B399235033BF60A3338158451099DEC44FE8B1920F57398E4439EE170B436C75FF3BA3BFC2C28BF8BCCB6D37261D9942F97133800DFEED491B8C8671824183CF9CD2CC20549B5BF672599D3F9CAD151E6F4C92A95C7FC888E4214039842D8B53E540D03495542D8C60B238BA9759FFAE27920E7688D35C92795D59741A8D0E5B34234C6DCC769F79A176BF63CCA190D0BEC19A8ACF3793A6522866BF14A14092474BBA68D100282CE8CB6DAB3C8041DB7544EABD759617446687311CE784129E88BE2558CE2917C790372F214D6E8D05B630B789F0D37E4EBB60E06A6B0C20FE075ED78960211A017F115D32F53B2D76E9B2AF302EC3887E47FE421CA76D246B0FCD8260B25380BED735F19C87C0545187841709C5A75B5547CDF43D52304C9D4760C8E625F7DA674A74; BPMCSRF=ulHtF40aiiRNzRWk5BMTWO; BPMLOADER=mnbxfikelfxqnnl2iz0aiobd; BPMSESSIONID=xjjysy25na5ig5sqbgdyxd14; UserName=83|117|112|101|114|118|105|115|111|114

 

And I guess all of them should be also passed to your request. This is not something that can be solved on the community, you need to test your integration authentication to find a correct way.

 

Also check if your authentication in terms of your integration is configured in the similar way to the one explained here.

Hi Oscar,

 

Thanks for the information. I will check further.

 

Thanks & Best Regards

Anusha

Show all comments

Hello team,

I have the need for connect Creatio to a sql server using active directory password authentication. We need a script task that basically is using the sql connector.

From my dev environment was working OK, but installing the package in cloud server I'm getting the error the adalsql.dll is missing.

I tried to installed importing the dll but I'm getting a error. Net asambly.

Somebody face this issue before?

 

The library is https://www.microsoft.com/en-us/download/details.aspx?id=48742

And the dll is adalsql.dll or adal.sql

Like 0

Like

5 comments

Hi Feredico, 

 

We don't have practical examples of such issue. As we said before, it couldn't be performed on our side, but checking your request I found some info which might be helpful for you. Please check the solution in this article below: 

 

https://github.com/Microsoft/sql-server-samples/issues/265

 

Best Regards, 

 

Bogdan L.

Thanks Bogdan, that's require a manipulation from the server side, with in cloud environments is not posible install the library. I'm trying to import the dll using creatio but I'm getting a error of. Net asambly, no Metter with version of dll.

Federico Buffa ...,

 

We also double checked this question so this reply from Anastasiia still valid. 

 

 

Please also check this articles:

 

https://stackoverflow.com/questions/4469929/could-not-load-file-or-asse…

 

https://www.outsystems.com/forums/discussion/46739/problem-when-trying-…

 

Best Regards, 

 

Bogdan L.

Bogdan Lesyk,

The reply from anastassia requiere the dll that Im asking to install and she said is not posible. Still I dont understand what security reason can be installing a library from microsot that is allowing connect to datbase sql using AD connetions.

 

I will check the others 2 articles.

https://www.nuget.org/packages/Microsoft.Data.SqlClient.SNI.runtime/

 

Package is impossible to install in the server? Is a very well know Microsoft library and the servers are windows.

Show all comments

 Hello Team.

 

There is any way to get the value of the record in the store.loadPage?

I can access to the record parameter inside of the callback.

Terrasoft.sdk.Model.addBusinessRule("ExpensesDetail", {
	name: "GetRoleFromtheUser",
	ruleType: Terrasoft.RuleTypes.Custom,
	triggeredByColumns: ["Subcategory"],
	events: [Terrasoft.BusinessRuleEvents.ValueChanged, Terrasoft.BusinessRuleEvents.Save],
	executeFn: function(record, rule, column, customData, callbackConfig) {
 
 
		var myrecord = record;
 		var passedTheTestAndIsValid = true;
 
		var currentUser =Terrasoft.CurrentUserInfo.userId;
		var store = Ext.create('Terrasoft.store.BaseStore', {
			model: 'SMVwUserRoles'
		});
		var queryConfig = Ext.create('Terrasoft.QueryConfig', {
			columns: ['SMId', 'SMUserName', 'SMRoleName'],
			modelName: 'SMVwUserRoles'
		});
		store.loadPage(1, {
			queryConfig: queryConfig,
 
			filters: Ext.create('Terrasoft.Filter', {
				property: 'SMId',
				value: currentUser
			}),
			callback: function(records, operation, success) {
				var loadedRecord = records[0];
				if (loadedRecord) {
					var contact = loadedRecord.get('SMRoleName');                                                                                                    
					if (contact) {                                                                                                                   
						console.log(contact);
					}
					}
				},
					scope: this
			});
 
	},
	position: 3
});

 

Like 0

Like

2 comments
Best reply

Hello Federico,

 

You have the myrecord variable and it's accessible inside the loadPage method:

So you can access the record parameters if needed there.

 

Best regards,

Oscar

Hello Federico,

 

You have the myrecord variable and it's accessible inside the loadPage method:

So you can access the record parameters if needed there.

 

Best regards,

Oscar

Oscar Dylan,

 Thanks Oscar, I my case sending the scope: this was not working but changing the scope works.

Show all comments