Hi Community,

 

We've this situation where we need to execute a query to the database when we press the button that we created following this article https://academy.creatio.com/docs/developer/mobile_development/mobile_ap….

 

So far we manage to create the button itself and retrieve the record id when this button is pressed.

Ext.define("Terrasoft.controls.CustomRecordPanelItem", {
    extend: "Terrasoft.RecordPanelItem",
  	requires: ["Terrasoft.EntitySchemaQuery"],
    xtype: "cftestrecordpanelitem",
    config: {
        items: [
            {
                xtype: "container",
                layout: "hbox",
                items: [
                    {
                        xtype: "button",
                      	cls: 'btn',
                        id: "clickMeButton",
                      	text: '<div style="color: white">TERMINAR</div>',
                        flex: 5,
                    },
                ]
            }
        ]
    },
    initialize: function() {
        var clickMeButton = Ext.getCmp("clickMeButton");
        clickMeButton.element.on("tap", this.onClickMeButtonClick, this);
    },
    onClickMeButtonClick: function() {
        var record = this.getRecord();
      	var servicoId= record.data.imdServico.data.Id;
      	var activitycategoryId = '82e0f151-a00a-46c5-8916-b87992266de6';
 
      	var esq = this.Ext.create("Terrasoft.EntitySchemaQuery", {
            rootSchemaName: "Activity"
        });
      	esq.addColumn("imdServicos.Id", "ServicoId");
      	esq.addColumn("ActivityCategory.Id", "TipoCheckListId");
 
      	var esqFirstFilter = esq.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "imdServicos.Id", servicoId);
      	var esqSecondFilter = esq.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "ActivityCategory.Id", activitycategoryId);
 
      	esq.filters.logicalOperation = Terrasoft.LogicalOperatorType.AND;
 
      	esq.filters.add("esqFirstFilter", esqFirstFilter);
		esq.filters.add("esqSecondFilter", esqSecondFilter);
 
        esq.getEntityCollection(function (result) {
            if (result.success) {
              	window.console.log(result);	
                /*result.collection.each(function (item) {
 
                });*/
            }
  		}, this);
 
        Terrasoft.MessageBox.showMessage(record);
    }
});

We are having problems trying to execute the Ext.create("Terrasoft.EntitySchemaQuery") because we think that some dependencies are missing.

 

Any idea on how to solve this problem?

 

Thanks in Advance.

 

Best Regards,

Pedro Pinheiro

Like 0

Like

3 comments

Hi Pedro,

 

Can you send the debug result using the mobile application emulator? What is the error?

 

Best regards,

Oscar

Hi Oscar Dylan,

 

Thank you for your response. The following image shows the error that we are getting when pressing the button.

 

 

var esq = this.Ext.create("Terrasoft.EntitySchemaQuery", {
            rootSchemaName: "Activity"
        });

We think that the error might be related to the lack of dependencies.

 

Best Regards,

Pedro Pinheiro

Hello Pedro. Did you manage to get the result of the queries?

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

Hi Community?

I want to hide some column filters, like I show in image below, since I have many columns in this object.

Does anyone know if there's any way to hide it? I'm not finding any documentation about it.

Thanks in Advance.

 

Best Regards, 

Daniel Longo

Like 0

Like

1 comments

Hello Daniel,

 

This is a core application logic and it's not possible to hide these columns. However you can use the "Search for filter column" option that was developed to find the needed filter column fast.

 

Best regards,

Oscar

Show all comments

Hello,

 

I want to open a webpage in browser in mobile application by tapping on a custom string field but could not find any solution in academy or community.

 

Regards,

Malay

Like 1

Like

4 comments

Dear Malay,

 

In detail Communication option for accounts and contacts, you can find the communication option Web - after the link is added to it you will be able to click it. To add this logic to your field check the code of this detail in OOB mobile application and mimic it for your field. 

 

Best regards,

Angela

Hello Angela,

 

I have seen this field, but in the advanced settings it is hidden from me as it is a out of the box field. I cannot find it in any lead mobile page or lead edit page v2.

If you have source code for this, please provide me so that I can implement that on my field.

 

Regards,

Malay

Malay,

Check MobileAccountCommunicationModelConfig schema or simular schema for contact section. 

 

Best regards,

Angela

Angela Reyes,

 

I have checked all the schemas related to account and contact, but could not find the definition for that "Web" field which is clickable in mobile.

I have checked the MobileAccountCommunicationModelConfig  also but could not find anything.

 

Regards,

Malay

Show all comments

Hello all,

 

How can I modify the page layout of a detail that isn't also a section within the Creatio mobile app? I only get the option to change how it's connected to a page. 

I need to be able to change the fields that are shown but the embedded detail won't do the trick because it's not clear on when one detail record ends and the next begins.

 

Thanks in advance for your help.

Like 0

Like

1 comments

Hello Kevin,

 

It is necessary to go to the section Page Setup, scroll down to New button, select Embedded detail option, add your detail and hit New column to add required fields. You can also the fields them in the required order there. 

 

Regards,

Dean

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

Hi Community,

In mobile, we have fields which basically of data type decimal. If these are not in focus, it should show on proper decimal format the same behavior in your web application. Any idea how to achieve this?

 

The below example should show 25,046

Like 0

Like

1 comments

Hi Community,

 

I able to change css dynamically for section list view on CRM (browser). This article I followed.

 

Question: How to change css dynamically for a section list view column on mobile interface? There is no documentation exist. I need to change background color of case status on mobile list view on the basis of its value

 

Any help will be highly appreciable.

 

Regards

Like 0

Like

1 comments

The article by the link below describes how to add custom css to a mobile application:

https://community.creatio.com/articles/adding-custom-css-mobile-application

Please find the correct selector for the element you want to apply the custom css to. For example, it's possible to change the background color for the records in the Case section using selector

$("div[class='ts-list-subtitle-column']").css("background-color", "yellow");

 

 

 

 

 

Show all comments

I am trying to create a mobile rule. This is in my DEV instance. Please see the screenshots.

My rule does not take effect in the mobile app and I am not sure why? Can anyone see any glaring issues?

 

Thanks,

Heather

Like 0

Like

2 comments

Heather,

Seems that the reason is in fact that you've specified your value using double quotes "", but it should be 'stage_id' (using single quotes instead).

Also you need to add your business rule to ModelExtensions, not PageExtensions of your mobile application manifest.

Please try applying stage id in such a way and also applying your business rule to ModelExtensions it should help, because there is nothing else that can cause the problem.

Best regards,

Oscar

Show all comments