Hi Community,

 

In mobile, I found this sample below in Academy on how to add filter to dropdown field. My question is how to add mulitple filter to dropdown field. I tried below syntax but it is not working

 

addFilter: [

             {

                      property: "IsChief",

                     value: true

             },

             

             {

                      property: "IsChief2",

                     value: true

             },

]



 

Like 0

Like

1 comments

Hi Fulgen, 

 

Please try to use it in this way : 

 

addFilter: {

type: Terrasoft.FilterTypes.Group,

subfilters: [{...}, {...}]

}

 

Best Regards, 

 

Bogdan L.

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

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.

 

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

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,

 

I am trying to view Notes field as multi-line text in Activity section in mobile application, but it is appearing in single line as a result of which, the long texts are not visible properly.

 

 

This field is multi-line in web application but I need this multi-line in mobile application also.

 

Please suggest me a way to make this field multi-line.

 

Regards,

Malay

Like 0

Like

6 comments
Best reply

Hello Malay,

I have an article covering how to do this in mobile here https://customerfx.com/article/adding-a-multiline-text-field-in-the-cre…

Note, the code is added to a module in the mobile client, you can see how to create that here https://customerfx.com/article/creating-modules-for-the-creatio-mobile-…

Ryan

Hello Malay,

I have an article covering how to do this in mobile here https://customerfx.com/article/adding-a-multiline-text-field-in-the-cre…

Note, the code is added to a module in the mobile client, you can see how to create that here https://customerfx.com/article/creating-modules-for-the-creatio-mobile-…

Ryan

Thanks Ryan, It works.

 

I just have another query that how to put a placeholder in the http link field in mobile so that it does not show the full real link, instead of this it shows some meaningful string.

 

For example, for "www.google.com", I want to show the link as "Google Search".

 

And also, how to make read only field text color as black. (The address field in above screenshot of mobile is read only but it is appearing as grey text).

 

It would be helpful if this can be done.

 

Thank you in advance.

 

Regards,

Malay

Malay Garg,

There is a way to change the color of read-only fields. You can do this using the utility method Terrasoft.util.writeStyles.

 

By default the style of the disabled fields looks something like this:

 

Terrasoft.util.writeStyles (

 

.x-field.x-item-disabled input,

.x-field.x-item-disabled textarea {

color: rgba(0, 0, 0, 0.26);

-webkit-text-fill-color: rgba(0, 0, 0, 0.26);

-webkit-opacity: 1;

}

 

);

 

So you will need to change the alpha value of rgba from 0.26 to 1.

 

You can do the changes in the existing schema in LESS like in the desktop Creatio. You can also do this in the existing schema declared in the manifest in the CustomSchemas section. Or you can create a new schema and declare it in the CustomSchemas section.

 

 

As for the question about a placeholder in the http link field. As far as I understand you want to use hyperlinks in some fields. Could you please explain where you want to put them? Which fields exactly? I hope I understood you correctly.

 

 

Best regards,

Max.

Max,

 

I will try this.

Yes, I want to put the placeholder for the following string field which is a link:

 

Regards,

Malay

Malay Garg,

 

Unfortunately, there is no out of the box solution to do this. It can theoretically be implemented via development but you will have to contact your manager about it.

 

Best regards,

Max.

Max,

 

Thanks for confirming.

 

The previous code I have tried putting in the LESS in a module after changing the value 0.26 to 1 and included module in activity section page extensions in workplace manifest . Still it does not make the field color black.

 

I have restarted the application pool and synchronized also but still it does not work.

 

regards,

Malay

Show all comments

Hello

 

I was trying to validate email format and phone number format in activity section in mobile application but could not find anything.

Please provide me a way to validate these fields in mobile application.

 

Regards,

Malay

Like 0

Like

5 comments

Hello Malay,



Could you please provide us more detailed information on your business task? Could you share screenshots?



Thank you in advance!

 

Best regards,

Bogdan

Hello Bogdan,

 

Hello I want to apply validation for mobile number and email in activity section. For example, the phone number should be of 10 digits and only contain numbers and email format should be of the form abc@xyz.com.

 

I have used JavaScript for lead section to do it for the web version but how to do it for the mobile application?

 

Below is the screenshot of the mobile activity page where I want to apply this validation.

 

Regards,

Malay

Hello Malay,

You can use a custom business rule for this task. See here for an example: https://academy.creatio.com/docs/developer/mobile_development/mobile_ap…

For using the custom rule for validation, you can pass a third parameter to the callback function with a message (the validation message) and value (true or false indicating if validation passed or not).

For example:

var result = {};
if (passedTheTestAndIsValid) {
    result = {
        value: true
    };
}
else {
    result = {
        value: false,
        message: "The entered value is invalid"
    }
}
 
// now include the result in the callback
Ext.callback(callbackConfig.success, callbackConfig.scope, [result]);

Ryan

Ryan Farley,

 Thanks for share it. You have any example using esq query in custom business rules for validations?

Christian Kern,

 

1. File will be stored in configurations.

 

2. The main rule - the first word of business rule name should be the section name. Like "Contact", "Case", "Account". 

 

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,

 

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