Hello, When I log in to Creatio, then close the browser, reopen it, and try to access Creatio again, it turns out that I need to log in again. From what I understand, this is due to the fact that cookies are set to expire at the end of the session, so they are removed when the browser is closed. As a result, the system setting "UserSessionTimeout" is not being respected here. Is there any option to change this behavior?
When you close the browser, in this case, the value of UserSessionTimeout is generally not used. The browser, by default, should not delete cookies; this only happens if the user sets it up that way.
I also logged into the environment on a new browser with default settings, closed it, reopened it, and I was still logged into the environment, which is expected because the cookies still exist.
I would recommend checking the browser settings and how it handles cookies.
It seems that it's now easy to block third-party cookies, but our system stores third-party cookies, and, for example, in Chrome, this is called 'site data on the device,' where you can choose to clear everything when you close all windows.
This solution is not working, as I already said it is for Web Browser. When I start test tool for application, it runs using chrome and window.open works, but in android application, it has error.
I have this fragment in my execute function
var winPrint = window.open("", "_blank");
winPrint.document.write(response.value.data.agreementText);
winPrint.document.close();
Could you please specify where you are trying to write your code? Is this related to the mobile app needs described above or you want to implement another feature? What is your business task? Could you please also clarify what schema you use and provide a full code so we will be able to test it at our end?
add button to get General Agreement (we have Html format at our API, if needed we can return URL)
after successful response, take returned html (or url) and show document to user
show print preview to print document.
In web, we have small JS code to handle it.
// url parameter is empty because we are writing html in document.// also we can generate blob url and set it without writing directly in document
var winPrint = window.open("", "", "left=0,top=0,width=800,height=600,toolbar=0,scrollbars=0,status=0");
winPrint.document.write(response.value.data.agreementText);
winPrint.document.close();
setTimeout(function(){
winPrint.print();}, 1000);
On mobile app, I tried to generate blob url and code fragment is
var blobUrl = URL.createObjectURL(new Blob([response.value.data.agreementText], { type:"text/html"}));
var winPrint = window.open(blobUrl);
setTimeout(function(){
winPrint.print();}, 1000);
this code, opens webview and shows my html, but print function is not defined, beacuse winPrint doesn't owns it.
After it, I tried another way, added new field and set blobUrl as its value. new field type is link, so user must click on it. but second problem appeared, Terrasoft.Utils library has metod getUrl as I remember, which is calling on click, this method validates url, but in this case it makes url invalid. blob url is "blob:file:///..." and this method prepends http:// and because of it blob url is invalid.
But now I have new workaround, upload pdf on storage, return storage url from API, set it to new field and click on it.
But if print function is implemented and needs specific usage I want to know it. It is not good to upload temp files on storage :(
Could you please provide a step-by-step description of your business task? Alas, it is still a bit unclear.
Could you please describe where the button should be located? What section from the left-panel list (menu) should I open? Could you please do it in a way like "go to Cases section > open a case > choose such-and-such field/button > it opens the web-page we need"? The link is the HTML from your API, am I correct?
As for the third point ("show a print preview to print document"), could you please specify how you want to print it? The user opens the General Agreement by clicking the newly-created custom button, then see the Agreement itself in the HTML format and how it will be printed? Will a user be asked to print it (like an alert notification)? Are you going to print it through a usual wireless printer machine like an average hard-printed paper?
First of all, I already done this task, using business rule, setting API url in custom field and then user must click on it. It opens chrome and our API will show html content and calls print preview in chrome.
Yes, We want to print document using wireless printer, using chrome print preview.
Here is task:
- Go to contacts -> Select contact -> Open actions -> Click Print General Agreement button.
Button action:
Send API request
Read html content of general agreement from response
Show this html content as web page
Initiate print preview
To achieve this, I tried:
Open new window using window.open and set document content from api response. this case was failed, because opened window object hasn't Print function to print document, because opened window object isn't fully same as base window object.
Tried to create Blob url using native js functionality, I got link, set it to my custom field value, but on click, bpm utils has function to validate url getUrl and this function cant validate blob url, because it is blob:file:///..... and this function adds http:// from behind.
I made some changes at my api, added new endpoint to return rendered html view. In bpm 'Print general agreement' button makes api request and sets url in custom field value. So user can click on api url, all bpm validations working because url starts with https:// and opens chrome where document is rendered from api.
Please do not forget to add a local string as the instructions state, restart the application pool, and re-login to the mobile app.
All these steps described above create a working button and open a web-page (it works correctly at both our end and yours).
Thus, as the main part is implemented and works well, please double-check your API and printer settings. Alas, this point is not our expertise and could not be considered within Creatio development tools.
But, my business task isn't only this what you describe. After opening window with my location, I want to initiate print() function of window object, but it hasn't implemented because opened window object is not same as in chrome or other browser.
As I mentioned, I Already done this task, with small workaround. After clicking button, which brings url from API, I set that url to my custom field (viewType: url) . So user click that field and it opens chrome or other browser, and there I can use print() function.
I tried to use my landing page on Firefox and with uBlock Origin app - it worked fine. Have you tried to turn it off in case you suspect it is the source or use incognito mode in which plugins are disabled? Also, what error did you get?