Hello Team!

I'm wondering if there is possible create a virtual column in mobile, like we are doing in the web version with attributes. There is any way to replicate that?

 

Regards,

 

Like 0

Like

1 comments

Hello Federico,

 

Hope you're doing well.

 

At the moment, the mobile application doesn't support interaction with virtual columns. We have created a request to the R&D team so they could review the possibility of further implementation of this functionality in the future versions of the mobile application. 

 

Thank you for helping us to provide better services!

 

Best regards,

Roman

Show all comments

Hello Team!

Somebody know if there is a save validation in mobile like the method in web version:

			asyncValidate: function(callback, scope){
				this.callParent([function(resultObject){
 
						resultObject.success = false;
						resultObject.message = scope.get("Resources.Strings.SummitionNoAcepted");
 
 
					callback.call(scope, resultObject);
				}], scope);
			},

I need to validate if a detail has records added before save the record.

Like 0

Like

4 comments

Hello Federico,

 

There is an onSaveButtonTap method in the base edit page controller schema that is triggered when the record is saved. There is no async validator there, but in case you need to check something for the saved record upon saving then you need to look at that method call.

 

Best regards,

Oscar

Oscar Dylan,

 Thanks Oscar. I need to create a page controller for a custom section? There is some documentation about that?

Federico Buffa ...,

 

No we don't have such an instruction unfortunately.

 

Best regards,

Oscar

Oscar Dylan,

 Thank you so much. Just wondering if that method can be use in the module config or needs to be in another schema. I don't have much information about mobile structure.

Show all comments

Hello Team!

 

I need to hide one filed based of the selection of one category lookup. I follow the academy  with the steps for the rule type. But my question is whats happend when you have more values in a OR condition. I tried to placed all the conditions in the same rule and didn't work and as well like in the example separate, but only the last one is working. How is the correct process in this case?

 

Thanks,

 

Like 0

Like

1 comments

Hello Federico, 

 

We performed some tests in order to achieve your requirement, but it seems like such implementation is not possible for now. The only one business rule will be active in this case. We already informed our Core R&D team and we will work to add such functionality in our next releases. Thank you for understanding!



Best Regards, 

 

Bogdan L.

Show all comments

Hi Team,

 

I want to know how we can use the functionality of open- edit pages, pre - configured pages and dialog box in Creatio mobile application.

 

Can you please help me out in figuring this out?

 

Thanks in advance

Sarika Sharma

Like 0

Like

1 comments

Hello Sarika, 

 

Unfortunately, the pre-configured pages and the dialog boxes (modal windows) are not presented in the default configuration of the mobile application yet. 

 

Detailed information about the mobile application interface (as well as information on how the edit data option works there) can be found in the Get started with the mobile app UI Academy article. 

 

Best regards, 

Olga. 

Show all comments

Hi Community,

In mobile application I have a button "Terminar" that when I press it I want run a process from my process library in Creatio.

To implement this button I created the following component and a function "onClickMeButtonClick", that is responsable for executing the process after pressing the button. To execute the process I used "Terrasoft.configuration.ProcessModuleUtilities", but I'm not sure if this is the best way to implement this example.

Any idea on how to develop this logic?

 

Thanks an advance.

 

Best Regards,

Daniel Longo

Like 0

Like

2 comments

Hello Daniel,

 

The mobile application UI doesn't support working with business processes and processes are only triggered on the server side in real-time once the record is modified in the mobile application or record is added (and correspondent start signals are present in some process).

 

Our core R&D team already has a task to make it possible to work with business processes from the UI directly and I will also let them know about your post so to prioritize the task for them.

 

Thank you for helping us in making the app better!

 

Best regards,

Oscar

Thank You Oscar.

I think it is a important feature for the application, so that the actions of the buttons can be dynamic and don't just give it "Message Alerts".

 

Best Regards,

Daniel Longo

Show all comments

Hello,

 

How can cache the lookups to the device in order to view them in offline mode for mobile app?

 

Thank you.

Maher.

Like 0

Like

3 comments

Hello Maher,

 

Once you sync the mobile app with the main app all lookup values are being saved in the cache of the mobile app and will be available for selection in offline mode. In case you've added new lookup values to the main app and need them to appear in the mobile app please sync the mobile app with the main app and new values will appear as needed.

 

Best regards,

Oscar

Oscar Dylan,

Hello Oscar,

 

Thank you for the reply.

I am not able to see the list of values in offline mode for some reason, are there any steps to do or configurations?

I did synchronize before disconnecting from the network.

 

Maher.

maher daher, maybe our steps to reproduce the behavior are different. Can you please specify the value for the system setting with the "MobileApplicationMode" code (try setting the value as "Offline")? Have I understood you right that you perform synchronization, then disconnect your device from the network and then try to edit the record, select the lookup, but you don't have any values there? Is this a custom lookup or some out-of-the-box lookup?

 

Please also make sure that your lookup is present in the SyncOptions property -> SysLookupsImportConfig attribute in the mobile application manifest (as described here). Because your lookup may simply not sync with the mobile application.

 

Best regards,

Oscar

Show all comments

Hello, 

I have button to set some data in one field. this field is empty before button click, so it is hidden on record page. after button click when I set data to this field, I want to show this field immediately.

 

How can I reload record page? 

Like 0

Like

4 comments
Best reply

Hello Luka,

 

To solve your business task you need to add visible value to the field and bind it to the method:

"visible": {"bindTo": "visibleMethodName"}
and create an attribute 
"hideFieldAttribute": {
        "dataValueType": Terrasoft.DataValueType.BOOLEAN,
        "value": true
      },

This method will be triggered by a button click and should set an attribute:

buttonAction: function() {
        this.set("hideFieldAttribute", false);
      },

This method is bound to the visible property of the field:

 visibleMethodName: function() {
        var result = this.get("hideFieldAttribute");
        return result;
      },

Please let us know if it helps!

 

Best regards,

Bogdan S.

Hello Luka,

 

Have you tried calling the this.reloadEntity(); method on custom button click? What was the result?

 

Best regards,

Oscar

reloadEntity is for web app. in mobile app, record instance doesn't have reloadEntity :( 

Hello Luka,

 

To solve your business task you need to add visible value to the field and bind it to the method:

"visible": {"bindTo": "visibleMethodName"}
and create an attribute 
"hideFieldAttribute": {
        "dataValueType": Terrasoft.DataValueType.BOOLEAN,
        "value": true
      },

This method will be triggered by a button click and should set an attribute:

buttonAction: function() {
        this.set("hideFieldAttribute", false);
      },

This method is bound to the visible property of the field:

 visibleMethodName: function() {
        var result = this.get("hideFieldAttribute");
        return result;
      },

Please let us know if it helps!

 

Best regards,

Bogdan S.

I resolved it, using business rule. Thanks a lot, you gave me good point.

record.changeProperty("UsrGeneralAgreementUrl", {
    hidden: false
});

 

Show all comments

Hello, 

I want to override initializeView or pageLoadComplete in mobile app. I have to do some changes before page load completes.

 

on web app I override onEntityInitialized function and I can do things there.

 

How can I override functions in mobile app?

Like 0

Like

3 comments

Hello Luka,

 

If you need to perform any actions on the mobile before the page is loaded, you can use business rules functionality for that. Please check this Academy Article.

 

Best regards,

Bogdan S.

Bogdan Spasibov,

Yes, I have business rule and I am setting new value of empty field using it. Because of this field is empty, it is hidden on record page and after business rule sets value, it is stays hidden.

But, when I select another contact and then select updated contact again, it shows updated field.

 

Picture 1 . Updated, but didn't change focus

 

Picture 2, Changed focus and returned to previously selected contact

 

Now this Field 'UsrGeneralAgreementId' is visible with its data.

I couldn't override initializeView function, but resolved it using business rule and resolved field visibility problem using changeProperty function.

 

record.changeProperty("UsrGeneralAgreementUrl", {
    hidden: false
});

 

Show all comments

Hello, 

I have button in mobile application, it's onClick function builds url of our api.

I want to navigate user on that url from onClick handler function, to open browser.

 

How I can navigate user to my url?

Like 0

Like

14 comments

Hello Luka,

 

Please add this function to the module that defines your custom button:

 

execute: function openLink () {

    var appWindow = window.open("https://www.wikipedia.org/","_blank");

    setTimeout( function () {if (!appWindow) {

        appWindow.location ="https://academy.creatio.com/";

            }

            },1000);

}

 

As a result once the button is clicked the function will be executed and in this example the https://www.wikipedia.org/ link will be opened.

 

Best regards,

Oscar

Oscar Dylan,

Is your code fragment for Mobile Application? 

Luka Grdzelishvili,

 

Yes, it was added to the custom module that was then added to the 

CustomSchemas of the mobile application manifest (the button was created using this article https://community.creatio.com/articles/adding-custom-user-action-mobile…) and this function was an example provided in this StackOverflow article https://stackoverflow.com/questions/11710902/can-i-make-a-link-that-wil….

 

Best regards,

Oscar

Oscar Dylan,

Nope, my question is not about opening mobile application from web page.

my question is about, opening web page from mobile application.

Luka Grdzelishvili,

 

Please apply this code, it opens the 

https://www.wikipedia.org/ website upon clicking a custom button inside the mobile app.

 

Best regards,

Oscar

Mark as 'Best reply'

Oscar Dylan,

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();

 

I saw error log, and there is problem at winPrint.document.write, Cannot read property 'write' of undefined.

 

I tried var winPrint = window.open("https://google.com", "_blank"); and it works. Now I have what is that view? and how can I set HTML content.

 

My api returns HTML string. I wrote question about url because I thought it was impossible to open web view from JS execute function.

It works, thanks

I have another problem now.

I need to print opened document, but there is error winPrint.print is not a function.

Can I somehow print opened page ?

Hi Luka,

 

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? 

 

Regards,

Anastasiia

Anastasiia Markina,

Hello,

My business task is:

  1. add button to get General Agreement (we have Html format at our API, if needed we can return URL)
  2. after successful response, take returned html (or url) and show document to user
  3. 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 :( 

Hi Luka,

 

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? 

 

Looking forward to hearing from you!

 

Regards,

Anastasiia

Anastasiia Markina,

Hello,

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:

  1. Send API request
  2. Read html content of general agreement from response
  3. Show this html content as web page
  4. Initiate print preview

To achieve this, I tried:

  1. 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.
  2. 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.
  3. 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.

Luka Grdzelishvili,

 

Let's consider your business task implementation from the very beginning.

 

1. Here is the instruction by the link below on how you can add a button to the mobile app: 

 

https://community.creatio.com/articles/adding-custom-user-action-mobile…

 

2. This code opens a new web-page: 

 

Ext.define("Terrasoft.MyAction", {
    extend: "Terrasoft.ActionBase",
 
    config: {
        useMask: false,
        title: "MyActionTitle",
        iconCls: Terrasoft.ActionIcons.Copy
    },
 
    execute: function(record) {
        this.callParent(arguments);
        var appWindow = window.open("https://www.wikipedia.org/", "_blank");
		setTimeout(function() {
  		if (!appWindow) {
    		appWindow.location = "https://academy.creatio.com/";
  		}
		}, 1000);
    	}
});

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. 

 

Regards,

Anastasiia

Anastasiia Markina,

Thanks for very detailed answer. 

 

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.

Show all comments

Hello, 

We want to print html document in mobile app. we have HTML document (whole, with , , tags) in response after calling API.

Now we need to show print preview or something like it, to print on connected printer. No matter how, the main thing is to print it.

 

In web app, we made it using small js code. 

1. open new window

2. set html text

3. call print function

but this all are using browser's functionality.

 

How we can make it in mobile app?

Like 1

Like

4 comments

Dear Luka, 



Unfortunately, there are no known examples of adding printing functionality into Creatio mobile application. 

Please follow this link to learn more on development in Creatio Mobile Application in order to find the possible ways of implementing the mentioned functionality:

https://academy.creatio.com/documents/technic-sdkmob/7-16/creatio-devel…



Kind regards,

Roman Brown



 

I think, I explained incorrectly.

I need to invoke print preview, maybe it will platform native or something like it.

Can I create webview and set html to it? in both platforms?

It work, thanks

I have another problem now.

I need to print opened document, but there is error winPrint.print is not a function.

Can I somehow print opened page ?

Show all comments