mobile
mobile application

Hi Team, 

 

I have an embedded detail in a mobile page, some times for network issue the file is uploaded with 0kb. There is any way to check of the size is more than 0 at the moment of save the attachment? I see there is a size column but always is null at the moment of add the image.

Like 0

Like

3 comments

Dear Federico, 

 

This issue can happen if a user works in a mobile application in an online mode while their connection is not stable. 

We will inform our R&D team to consider the possibility of creating warnings in cases like that. 

Meanwhile, it would be better for those users who are working from mobile with a bad connection to stay in an offline mode and sync their apps when the connection gets better. 

 

Kind regards,

Mira

Mira Dmitruk,

There is a way to push automatic the connection once the connection is better? Or pop up to the user a menssage to Sync?

Federico Buffa,

 

Unfortunately, it is not something we can do. Users can only go from offline to online and back manually and they should decide a better way to work at the moment themselves.

Show all comments
mobile
mobile application

Hi Team.

 

I just switched my app to offline mode and I see some of the rules applied are not working. 

Doing some debug I notice the main schema of the detail is in the SQLITE but not in the record field from the BR.

I added the schema in the sync fields as well in the lookups but still not reflecting. I'm missing something?

Thanks,

 

Like 0

Like

1 comments

Hi Dmytro,

 

No, everything seems to be set properly in the manifest. Additionally I could recommend checking if the AgilizExpenseManagement object is listed in the RequiredModels array of the AgilizExpenseDetailSection model and relogin to the mobile app.

 

Best regards,

Oscar

Show all comments

Hi Team,

 

There is any way to disable the offline mode for specific schemas like orders for example? I want to keep the offline for the rest but we have many quantity of orders and the first sync takes for ever.

Like 0

Like

1 comments

Hello Federico,

 

Unfortunately, it is not possible to change the synchronization method for only one section.

The synchronization method in the mobile application is a systemwide thing.

You can read more about it at the Creatio Academy here.

 

Thank you,

Artem.

 

Show all comments
mobile
mobile application
Mobile app

Hi Team, 

Im trying to show all the fields specially the Notes in the Activity Preview Page. I have the same code in other entity working but in Activities seams not to be working.

The function is triggered but no others fields are showing. Something have any idea why?

 

Thanks,

 

/* globals Activity: false */
Terrasoft.LastLoadedPageData = {
	controllerName: "ActivityPreviewPage.Controller",
	viewXType: "activitypreviewpageview"
};

Ext.define("ActivityPreviewPage.View", {
	extend: "Terrasoft.view.BasePreviewPage",
	xtype: "activitypreviewpageview",
	config: {
		id: "ActivityPreviewPage"
	}
});

Ext.define("ActivityPreviewPage.Controller", {
	extend: "Terrasoft.controller.BasePreviewPage",
	statics: {
		Model: Activity
	},
	config: {
		refs: {
			view: "#ActivityPreviewPage"
		}
	},
	
		/**
	 * @inheritdoc
	 * @protected
	 * @overridden
	 */
	doChangeField: function(field, newValue, executeRulesCallback) {
		this.callParent(arguments);
		field.show();
	}
});

Like 0

Like

3 comments

Hi Federico,

 

I've added the same code on my side and the Notes field appeared in the preview page:

Not sure why this is not working on your side at all. Try recreating a module with the controller from scratch and recycle the app pool after that.

 

Best regards,

Oscar

Hi Oscar, I have the notes fileds as a multiline. Can this affect?

Federico Buffa ?,

 

Try disabling the multiline attribute for the column and see what happens. Probably it can be the issue.

 

Best regards,

Oscar

Show all comments
mobile
mobile application
Mobile app

Hi Team, 

I'm getting an error in a custom section when I try to apply a filter in the mobile app.

 

Any ideas? The object is in the manifest to sync and the rest is working perfect. Only the filters can not be apply. 

 

Like 0

Like

3 comments

Hi,

 

According to the trace of an error there is a problem with the getColumnsSetColumns method execution. Please debug the method execution and share the iteration of the method call that results in the error message.

 

Best regards,

Oscar 

Hi Oscar Dylan,

 

The function is trigger first time with the primaryColumnSet and then the variable columnSetName is empty. You know from where is comming from this? I have a button in the edit page. that is a problem?

 

Federico Buffa ?,

 

It seems that columns for some model were not received. You need to check which model is called in this method and which model doesn't have the columns. As for the place from which the getColumnsSetColumns want's to receive the columns - it should be checked in the call stack. Also sometimes it helps to resave all the settings of the section (of the correspondent workplace) in the mobile application wizard and restart the main app and then relogin to the mobile app, maybe it will help in your case.

 

Best regards,

Oscar

Show all comments
Mobile app
mobile
mobile application

Hi Team, I have a amount field in the mobile up that is update by business process once the details are modified. Something like Order and Products, once the product is added or modified the total of the order is updated. 

The problem is once the detail is modified and the process impact the changes, the main page is not refresh until I change the section and go back. 

There is any way to force the refresh of that controller/preview from the detail controller?

Like 0

Like

6 comments

Hello Federico,



If I understood your request correctly, the next examples should be helpful for resolving your business task:

Kind regards,

Bogdan

Thanks Bogdan, is the same funtionality  but for the mobile app.

Dear Federico, 



Could you please your product (Sales, Service, Marketing, etc.)? 

And the name of the Workplace in the mobile application (Main workplace, etc.)? 

 

Thanks in advance!



Kind regards,

Bogdan

The product is sales 7.18.5 and the workspaces is the main workspaces.

Federico Buffa,

 

Unfortunately, there is no such functionality for the mobile application to avoid additional loading.



Best regards,

Bogdan

Refreshing the view page is not enough.

It is still necessary to wait for the completion of data synchronization with the server, which can take a long time or even stop due to a bad connection.

If the business logic is not very complicated, then as an option you can repeat it in a mobile application. But, for this you have to write JS code 

Show all comments
Mobile app
mobile application

Hi Team. I have a code to save a change in the record. The change is impact in the database but the lookup is stay in until the next sincronization. There is a way to refresh or push the sync for that particular record in the mobile app?

onClickMeButtonClick: function() {
		var record = this.getRecord();
		var recordId = record.getId();
		if (record.data.AgilizExpenseStatus.data.Id != "0bbc321a-77cd-4d20-a929-b5bbb34c74bc") {
			
			Terrasoft.ServiceHelper.issueRequest({
				serviceName: "SMExpensesManagmentValidator",
				methodName: "AttachmentsValidation",
				data: {
					Id: recordId
				},
				success: function(response) {
					if (response.AttachmentsValidationResult == "") {
						record.set("AgilizExpenseStatus", "0bbc321a-77cd-4d20-a929-b5bbb34c74bc", true);
						
						record.save({ 
							queryConfig: Ext.create('Terrasoft.QueryConfig', { 
								modelName: record.self.modelName,
								columns: ['AgilizExpenseStatus']
							}),
							success: function() {

//here I need to refesh the record.
								Terrasoft.MessageBox.showMessage(LocalizableStrings.SummitForApproval); 
								
							},
							failure: function(exception) { 
								Terrasoft.MessageBox.showException(exception); 
							}
						}, this);
					} else {						
					
					}
				},
				failure: function(response) {
					Terrasoft.MessageBox.showMessage("Error in webservice");
				},
				scope: this
			});
		} 
	}

 

 

Like 0

Like

5 comments
Best reply

Federico Buffa ?,

 

Ok, got it. You need to somehow call the refreshDirtyData method inside your method. As stated in the base page controller module:

/**
	 * Refreshes obsolete data on page.
	 * @internal
	 * @virtual
	 * @param {Object} operationConfig Configuration of operation.
	 */
	refreshDirtyData: function(operationConfig) {
		if (operationConfig) {
			this.refreshDirtyDataByOperationConfig(operationConfig);
		} else {
			this.loadData();
		}
	},

An example of a call of this method can be found in the FieldMobileVisitActions module (FieldMobile package):

onCheckInOutSucceeded: function(isCheckIn) {
        var record = this.getActivityRecord();
        var statusId = isCheckIn
            ? Terrasoft.Configuration.ActivityStatus.InProgress
            : Terrasoft.Configuration.ActivityStatus.Finished;
        record.set("Status", ActivityStatus.Store.getById(statusId));
        var queryConfig = Ext.create("Terrasoft.QueryConfig", {
            columns: ["Status"],
            modelName: record.self.modelName
        });
        record.save({
            isCancelable: false,
            queryConfig: queryConfig,
            success: function() {
                this.complete(function() {
                    var pageController = Terrasoft.PageNavigator.getLastPageController();
                    pageController.refreshDirtyData();
                    Terrasoft.PageNavigator.markPreviousPagesAsDirty();
                    var message = isCheckIn ? Terrasoft.LocalizableStrings.VisitActionDesignerCheckInOk :
                        Terrasoft.LocalizableStrings.VisitActionDesignerCheckOutOk;
                    this.callSuccess(message);
                    Terrasoft.Mask.hide();
                });
            },
            failure: function(exception) {
                this.callFailure(exception);
                Terrasoft.Mask.hide();
            }
        }, this);
    },

Hi Federico,

 

It can be the result of the missing lookup object in the SysLookupsImportConfig array of the mobile application manifest. You need to check if the object of your lookup is present there.

Hi Oscar, the lookup is there and is working with the manual selection just when I set the id in the button is showing like that's like if the sync is missing or something is not refresh.

Federico Buffa ?,

 

Ok, got it. You need to somehow call the refreshDirtyData method inside your method. As stated in the base page controller module:

/**
	 * Refreshes obsolete data on page.
	 * @internal
	 * @virtual
	 * @param {Object} operationConfig Configuration of operation.
	 */
	refreshDirtyData: function(operationConfig) {
		if (operationConfig) {
			this.refreshDirtyDataByOperationConfig(operationConfig);
		} else {
			this.loadData();
		}
	},

An example of a call of this method can be found in the FieldMobileVisitActions module (FieldMobile package):

onCheckInOutSucceeded: function(isCheckIn) {
        var record = this.getActivityRecord();
        var statusId = isCheckIn
            ? Terrasoft.Configuration.ActivityStatus.InProgress
            : Terrasoft.Configuration.ActivityStatus.Finished;
        record.set("Status", ActivityStatus.Store.getById(statusId));
        var queryConfig = Ext.create("Terrasoft.QueryConfig", {
            columns: ["Status"],
            modelName: record.self.modelName
        });
        record.save({
            isCancelable: false,
            queryConfig: queryConfig,
            success: function() {
                this.complete(function() {
                    var pageController = Terrasoft.PageNavigator.getLastPageController();
                    pageController.refreshDirtyData();
                    Terrasoft.PageNavigator.markPreviousPagesAsDirty();
                    var message = isCheckIn ? Terrasoft.LocalizableStrings.VisitActionDesignerCheckInOk :
                        Terrasoft.LocalizableStrings.VisitActionDesignerCheckOutOk;
                    this.callSuccess(message);
                    Terrasoft.Mask.hide();
                });
            },
            failure: function(exception) {
                this.callFailure(exception);
                Terrasoft.Mask.hide();
            }
        }, this);
    },

Thanks Oscar. works!

Oleg Drobina,

Will this also refresh embedded details associated with the record?

Show all comments
mobile
mobile application
styles

Hi Team, 

 

There is a way to add a style to the row in the details depend of a column value?

Example:

Like 0

Like

1 comments

Hi Federico,

 

It's theoretically possible. Please study the MobileActivityGridPageViewV2 module and the logic of styles applying there.

 

Best regards,

Oscar

Show all comments
mobile application
business rule
Mobile app
Mobile_Creatio

Hi Community,

 

I've this situation where I need to hide a detail based on condition, however i didn't find any example of this, only with filelds on the page, like i show on the image below with the custom business rule that I applied.

 

 

Any suggestions how to apply this condition in a detail?

 

 

Thanks in Advance,

Daniel Longo

Like 0

Like

3 comments

Hi Daniel, 

 

Actually, it is not possible to do with the detail, like the example with the fields you sent.

 

In order to achieve such implementation, you need to extend the controller and add the additional logic manually. 

 

Unfortunately, we don't have such examples. 

 

But here you can check my colleague answer, where to find the controller which you can modify: 

 

https://community.creatio.com/questions/there-way-make-detail-read-only…

 

Hopefully, it will be useful for you!

 

Best Regards, 

 

Bogdan L.

 

 

Bogdan Lesyk,

Are there any updates regarding hiding a detail in mobiel based on a condition please ?

developer,

 

Let's discuss it in terms of a thread created by you here https://community.creatio.com/questions/how-hide-detail-mobile-based-co…. I will check internal notes and will let you know about the possible ways of achieving this.

Show all comments
mobile
Mobile app
mobile application

Hi Team, Somebody know how to update data from the button in the mobile app?

 

Like 0

Like

5 comments
Best reply

Federico Buffa ?,

 

Hi,

 

Try using the following code to save the record value (for example using the following code I've renamed a contact):

 

var name = record.get("Name");
var columnName = record.self.PrimaryDisplayColumnName;
record.set("Name", name + " renaming method");
record.save({
			queryConfig: Ext.create("Terrasoft.QueryConfig", {
				modelName: record.self.modelName,
				columns: [columnName]
			}),
			failure: this.onViewError
		}, this);

Please note that columns from the queryConfig is an array and you can pass an array of column names here (and column names are stored inside the record.self.ColumnConfigs.keys).

 

As for refreshing the page - not sure if it's possible in the context of the button click handler function execution.

 

Best regards,

Oscar

Hello Federico,



Could you please elaborate more on this question? 



Best regards,

Bogdan 

Hi Bogdan, Sure. I have a button created in the preview page and I want to change a value of that record once the button is press, in this case is to change the status to pending to approval. I have my button like this but I don't know how to save the update record and refresh the page.

 Ext.define("Terrasoft.controls.CustomRecordPanelItem", {
    extend: "Terrasoft.RecordPanelItem",
    xtype: "cftestrecordpanelitem",
    config: {
        items: [
            {
                xtype: "container",
                layout: "hbox",
                items: [
                    {
                        xtype: "button",
						cls: "btn",
                        id: "clickMeButton",
                        text: '<div style="color: white; background-color: #8ecb60;  padding-top: 2%;  padding-bottom: 2%;">SUMMIT FOR APPROVAL</div>',
                        flex: 5
                    }
                ]
            }
        ]
    },
    initialize: function() {
        var clickMeButton = Ext.getCmp("clickMeButton");
        clickMeButton.element.on("tap", this.onClickMeButtonClick, this);
    },
    onClickMeButtonClick: function() {
        var record = this.getRecord();
		
	// I need to update here the record.
        Terrasoft.MessageBox.showMessage(record.getPrimaryDisplayColumnValue());
    }
});

 

Federico Buffa ?,

 

Hi,

 

Try using the following code to save the record value (for example using the following code I've renamed a contact):

 

var name = record.get("Name");
var columnName = record.self.PrimaryDisplayColumnName;
record.set("Name", name + " renaming method");
record.save({
			queryConfig: Ext.create("Terrasoft.QueryConfig", {
				modelName: record.self.modelName,
				columns: [columnName]
			}),
			failure: this.onViewError
		}, this);

Please note that columns from the queryConfig is an array and you can pass an array of column names here (and column names are stored inside the record.self.ColumnConfigs.keys).

 

As for refreshing the page - not sure if it's possible in the context of the button click handler function execution.

 

Best regards,

Oscar

Thanks Oscar. Is working perfect.

var record = this.getRecord();
if (record.data.AgilizExpenseStatus.data.Id != "0bbc321a-77cd-4d20-a929-b5bbb34c74bc") {
			record.set("AgilizExpenseStatus", "0bbc321a-77cd-4d20-a929-b5bbb34c74bc");
			record.save({ 
				queryConfig: Ext.create('Terrasoft.QueryConfig', { 
					modelName: record.self.modelName,
					columns: ['AgilizExpenseStatus']
				}),
				success: function() {
					Terrasoft.MessageBox.showMessage(LocalizableStrings.SummitForApproval); 
				},
				failure: function(exception) { 
					Terrasoft.MessageBox.showException(exception); 
				}
			}, this);
		}

 

Show all comments