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

Hello

I am updating the unsubscribe column data on Contact records with a php script.

Since a few days i get an error 500 when updating value in Contact: {"DoNotUseEmail":"true"}

When trying the request in postman, I get error 500 the first time, if I immediatly trying a second time it just works.

Using the same php script on a test environment doesnt give me this error.

  

Like 0

Like

2 comments

Hello Antoine,

 

Is the application hosted in the cloud or locally?

 

Best regards,

Oscar

Hello Oscar the application is hosted locally (On premise). Also updating other detail column in the same script is working fine. I suspect a database error and plan to do a Generate all-compile all-webApp restart tonight.

Show all comments

Hi Community,

 

I have built a Business Process that Triggers on "Record Added" for a Section.

My goal is that when I Create a Record in the section with OData using the "POST method", That custom business process should be triggered by System. But It is not getting triggered.

 

When I tried to create a new record from the system itself ( instead of OData ), the process got triggered. 

Can someone guide me on this? Is there any System Setting or specific configurations needed to be done?

 

I am using a cloud instance of 7.18.1.2800

Like 0

Like

3 comments
Best reply

Hi Pratik, 



This is the know issue of the version. 

Our R&D team is working on this to be fixed in the future releases. 

There's a workaround to this issue. To implement it please create following request to support team (since your instance is cloud) :

1) set "false" to following keys in  Terrasoft.WebApp\web.config 

<add key="Feature-UseSeparatedOdataEntitiesDll" value="false" />

<add key="Feature-ODataEntitiesCompilationInSeparatedDll" value="false" />

if such keys don't exist, they can be added to  the block <appSettings>;

2) Generate source code for all schemas and compile all. 





Please note, that this fix is only applicable for 7.18.1. Please remove this tags from web.config when updating to newer versions of the application, as it will cause the Odata functionality to not work. 



You can also refer to this community post in your support request. 

Best regards,

Yurii

 

Hi Pratik, 



This is the know issue of the version. 

Our R&D team is working on this to be fixed in the future releases. 

There's a workaround to this issue. To implement it please create following request to support team (since your instance is cloud) :

1) set "false" to following keys in  Terrasoft.WebApp\web.config 

<add key="Feature-UseSeparatedOdataEntitiesDll" value="false" />

<add key="Feature-ODataEntitiesCompilationInSeparatedDll" value="false" />

if such keys don't exist, they can be added to  the block <appSettings>;

2) Generate source code for all schemas and compile all. 





Please note, that this fix is only applicable for 7.18.1. Please remove this tags from web.config when updating to newer versions of the application, as it will cause the Odata functionality to not work. 



You can also refer to this community post in your support request. 

Best regards,

Yurii

 

Hi Yurii,

It Worked, Thanks for the help. 

Hi. 

This solution is for version 7.18.1 only.

Show all comments

Hi community,

I'm trying to read the contact tags using odata, in particular  I would like to expand the ContactTag object when I read the ContactInTag,

an  error raises

"The query specified in the URI is not valid. Could not find a property named 'ContactTag' on type 'Terrasoft.Configuration.OData.ContactInTag'."

Which is the correct entity name to expand ?

 

Like 0

Like

6 comments

Hello Stefano,

In the ContactInTag object, the reference to ContactTag is actually the property called Tag. I believe if you expand Tag, it should give you the ContactTag reference.

Ryan

Hello Stefano,



We've got the same result in our system as well. We are working on the solution to this issue.



Best Regards,

Tetiana Bakai

Ryan Farley,

Hi Ryan,

I tried you suggestion using $expand=Tag($select=name), but I receive this message "
An error has occurred."

Stefano Bassoli,

Hmm. I just tested that and I get the same error (also if I try to expand Entity). I wonder if it's because those are columns inherited from the BaseEntityInTag object (which is virtual)? I can expand CreatedBy fine on that object though. Not sure why the error occurs.

Hello Stefano,



For now you should use two select queries, because using the $expand clause with those columns would give you errors. We passed this problem to Core R&D team and got the information that there is some issue in Core logic that causes that thing, so they would fix it in the next versions.



Best Regards,

Tetiana Bakai

Tetiana Bakai,

thank you for your feedback

Show all comments

Hi, 

I need to get a list of accounts with their accountAddress as a list ,

and I Have this NavigationProperty  in account Entity

how I can wite the query to join account and account address using "AccountAddressCollectionByAccount" NavigationProperty 

 

Thanks 

Like 0

Like

1 comments
Best reply

Hi Moheman,

 

OData cannot perform such an operation in one action if calling /0/odata/Account endpoint. You can retrieve data from related entities (that are specified in lookup columns), but not from details. Or you need to perform OData request to AccountAddress collection and retrieve data on the related accounts there in the following manner:

 

https://o_drobina.tscrm.com/0/odata/AccountAddress?$expand=Account

 

Best regards,

Oscar

Hi Moheman,

 

OData cannot perform such an operation in one action if calling /0/odata/Account endpoint. You can retrieve data from related entities (that are specified in lookup columns), but not from details. Or you need to perform OData request to AccountAddress collection and retrieve data on the related accounts there in the following manner:

 

https://o_drobina.tscrm.com/0/odata/AccountAddress?$expand=Account

 

Best regards,

Oscar

Show all comments

Hi,

 

I have a strange behavior when working with postman and ODATA webservices.

 

I'm trying to get the data from "Product" section and keep getting an Error 500 message.

 

The link that I'm using is "https://domain.creatio.com/0/odata/Product"

 

In Addition, It's important to keep in mind the following:

1. Sending the get request to other sections works, for example: Order, Employee, Opportunity.

2. The issue started to happen after a few times I tried to add a new product from postman.

At the beginning I managed to add the product and after 5-6 times I started to get the Error 500 message even when querying.

3. Further to the previous bullet, every time the product was added I received an error message in postman, but saw the record in the application - very strange.

 

I eventually need also to query and to add products to the "Product" section.

 

Looking forward to having assistance.

 

Best Regards,

Raz

 

 

Like 0

Like

5 comments

Hi Raz,

 

First of all you need to check the application logs and see the actual server error that is received upon calling the Products object via OData. Secondly you need to check if there are no errors with any of the "Products" objects in the system configurations (maybe the system asks to update the database structure for any "Product" object in any package or source code update is required). Also try publishing all the replaced "Product" objects in configurations.

 

Best regards,

Oscar

Oscar Dylan,

Hi Oscar,

 

I didn't understand your answer at all.

 

I will elaborate:

1. The error 500 occurs even when querying the product section.

2. Which application logs? the application runs in the cloud.

3. what do you mean by "errors with any of the products objects"? again, the issue occurs even when querying the section.

 

Thanks,

Raz

Oscar Dylan,

Hi Oscar,

 

I have a new update on the issue.

I don't know what happen, but now the Get Request works, the Post request for creating a new product works too.

 

But, Once I enter the product in the system and "Close" button changes to "Save". It looks like something in the creation of the product didn't finish correctly.

 

Can you point me to what to check?

 

Thanks,

Raz

Raz Guille Rosman,

 

Hi Raz,

 

Regarding your remarks:

 

1) "1. The error 500 occurs even when querying the product section." - I did understand that and that's why asked you to go to system configurations and check if any of the "Products" objects has "Database update is required" or "Source code update is required" error flag. The situation you described looks like the issue with an object in configurations and that's why it had to be checked.

 

2) "2. Which application logs? the application runs in the cloud." - you should've mentioned that the application is running in the cloud. You can contact us directly at support@creatio.com to get the application logs if needed. If this was an onsite app the logs could be found at C:\Windows\Temp\Creatio folder in the machine where the IIS-server is deployed.

 

3) "what do you mean by "errors with any of the products objects?" - again, the issue occurs even when querying the section." - I meant the actual error on the object, something like this:

And yes I understood that you received the error when performing OData requests and everything is simple: if there is a problem with an object OData requests to this object can fail.

 

As for your last remark that the button becomes "Close", but not "Save": it means that there was some modification on the page that should be saved. It can be rather the method on the product page that wasn't executed (or was executed) completely or you've clicked on some field when the page was opened. No error here.

 

Best regards,

Oscar

Oscar Dylan,

H Oscar,

 

Thank you very much for your very detailed response.

 

1. The error 500 stopped, I don't know why. It just stopped and both the get and post requests are working correctly.

 

2. Thanks for the explanation. I'll keep that in mind for the next time.

 

3. I checked and there are no processes or other js code that runs in the background for a new record.

Do you have an idea where to start looking?

 

Thanks,

Raz

Show all comments

Hi,

 

Does the ODATA Web services mechanism supports collections?

meaning, using a post request with a json that includes arrays?

 

Thanks,

Raz

Like 0

Like

4 comments
Best reply

Hi Raz, 

 

Unfortunately we don't have practical examples of such implementation.

 

{

 "id": 1234,

"status": "ABC",

"Line_Items": [ {"prod_id":1111,"quantity":10},{"prod_id":2222,"quantity":20}],

"Order_Lines": [],

"Coupon_LInes": []

}

 

Most likely this code will not work, because Line_Items, Order_Lines and etc. will be perceived by the system like "field". 

 

You may create one order, in response you will get it's "Id" and then with using batch you may add  couple records in your details.

 

Best Regards, 

 

Bogdan L.

Hi Raz,

 

For this kind of requests OData has Butch. 

 

Please follow the link to check the details of how to work with it: 

 

https://academy.creatio.com/docs/developer/integrations_and_api/data_se…

 

Best Regards, 

 

Bogdan L.

Bogdan Lesyk,

Hi Bogdan,

 

Thank you for your response and article.

I didn't understand how the batch requests solves my scenaro.

I'll elaborate:

 

I have a woocommerce website that needs to update creatio every time there is a new order.

 

The woocommerce json looks like this:

{

 "id": 1234,

"status": "ABC",

"Line_Items": [ {"prod_id":1111,"quantity":10},{"prod_id":2222,"quantity":20}],

"Order_Lines": [],

"Coupon_LInes": []

}

 

As you can see one Json includes all the order data.

 

In Creatio for each array, like Line_Items, Order_Lines and etc, we have a detail connected to the order section.

 

Is there a way to use the ODATA Web services mechanism in such a way that the woocommerce website can update all the relevant sections and details?

 

Thanks,

Raz

 

Hi Raz, 

 

Unfortunately we don't have practical examples of such implementation.

 

{

 "id": 1234,

"status": "ABC",

"Line_Items": [ {"prod_id":1111,"quantity":10},{"prod_id":2222,"quantity":20}],

"Order_Lines": [],

"Coupon_LInes": []

}

 

Most likely this code will not work, because Line_Items, Order_Lines and etc. will be perceived by the system like "field". 

 

You may create one order, in response you will get it's "Id" and then with using batch you may add  couple records in your details.

 

Best Regards, 

 

Bogdan L.

Bogdan Lesyk,

Thank you for your response

Show all comments

Hi all,

 

Is there any way throught odata (or via a webservice) to retrieve for a given table, the translations of all columns ?

And if not, is it possible a server side ?

 

Like 0

Like

3 comments

Hello Jerome,

 

Here is an example of the odata request endpoint that gets all the localizable values for all the columns of the "Account" object:

https://o_drobina.tscrm.com/0/odata/SysLocalizableValue?$filter=SysSchema/Id%20eq%206404D801-E280-418A-A77C-D02B98271499

You will get an array of values where three key columns are "Key", "Value" and "SysCultureId" columns (by the way you can also include the "SysCultureId" column to the request filter). After that you can process with the data received.

 

Best regards,

Oscar

Jerome, 

In addition to Oscar's response, another way is to do a POST to:

/0/DataService/json/SyncReply/RuntimeEntitySchemaRequest/

And include the object name in the body, the body will look like this for the account object:

{"Name": "Account"}

You'll get back a list of all properties for the object including the captions in all defined translations.

Ryan

Oscar Dylan,

Thanks a lot, I used this:

/0/odata/SysLocalizableValue?$select=key,value&amp;$expand=SysSchema($select=Id,Name),SysCulture($select=Id,Name)&amp;$filter=SysSchema/Name eq 'Case' and SysCulture/Name eq 'fr-fr'

 

Show all comments

We are developing an external application to Creatio with integration via oData.

We need to know how to obtain with odata the required fields of a schema, for example contact and the data type of each field.

 

Thank you!

Regards

Like 0

Like

2 comments
Best reply

Hello Uriel,

Once authenticated normally, you can do a POST to the following (it's DataService, but when you authenticate for OData it will also work for DataService, even if you're using OData for the other requests):

/0/DataService/json/SyncReply/RuntimeEntitySchemaRequest

Include the following payload in the request:

{"uId":"25d7c1ab-1de0-4501-b402-02e0e5a72d6e"}

Where the uId included is the UId for the entity (you can get this from SysSchema or VwSysSchemaInWorkspace where ExtendParent = false). You'll get back a json payload with details for all columns, including the "isRequired" value for the column.

Ryan

Hello Uriel,

Once authenticated normally, you can do a POST to the following (it's DataService, but when you authenticate for OData it will also work for DataService, even if you're using OData for the other requests):

/0/DataService/json/SyncReply/RuntimeEntitySchemaRequest

Include the following payload in the request:

{"uId":"25d7c1ab-1de0-4501-b402-02e0e5a72d6e"}

Where the uId included is the UId for the entity (you can get this from SysSchema or VwSysSchemaInWorkspace where ExtendParent = false). You'll get back a json payload with details for all columns, including the "isRequired" value for the column.

Ryan

Ryan Farley,

Thank you! Have a nice weekend.

Show all comments

We have a PowerBI report connecting to Creatio through OData, with a data source refresh every day at 7am MST. Every single day, it fails with this message.

---------------------------------------------------------------------------------------------------------------

Failure details: The last refresh attempt failed because of an internal service error. This is usually a transient issue. If you try again later and still see this message, contact support.

{"error":{"code":"ModelRefresh_ShortMessage_ProcessingError","pbi.error":{"code":"ModelRefresh_ShortMessage_ProcessingError","parameters":{},"details":[{"code":"Message","detail":{"type":1,"value":"OData: Request failed: The maximum number of redirections allowed was reached. (Found)"}}],"exceptionCulprit":1}}} Table: KwlBusinessLineCollection.

Then our Administrator goes into PowerBI and resubmits the refresh manually, and it works.

----------------------------------------------------------------------------------------------------------------

Has anyone encountered this or know the cause?

Thanks,

Like 0

Like

4 comments

Dear Heather, 

Please make sure that the flag LogSessionForSessionLessRequest is set to false in web.config in the root folder in installation files of your site. 

Dennis Hudson,

Is that something I have access to through the development console?

Heather,

 

If you have an on-site application you can find the web config file in the installation files. If you have a cloud application, you can request this information from the support team (support@creatio.com).

Heather,

 Did you manage to connect using Odata?

Show all comments