Mobile app
Studio_Creatio_enterprise_edition
8.0

HI all,

I need your help.

I'm Trying to customize the mobile app. But each time I follow the documentation 

and need to modify the manifest module with:

e.g: 

"CustomSchemas": ["mycustommudule"],

 

I get console error (on the debugging browser) saying:

Path for schema 'mycustommudule' not found.

* i get this error for every custom module I create and try to add it to "CustomSchemas".

 

Or  adding "PagesExtensions": [mycustommudule,...]  <-- doesn't work

 

Basically i'm trying to add a button to my custom section on the mobile app & handle it's "on click" event. but i just can't make it work..

* I followed the documentation on :

https:/academy.creatio.com/docs/developer/mobile_development/customization/manifest/add_a_button  

 

with no luck...

 

Thank.

  

Like 0

Like

1 comments

HI Eran!

 

Have you tried generating source code for all schemas and compiling the app?

 

Best regards,

Max.

Show all comments
Mobile app
Mobile_Creatio

I have created a second workplace for the mobile app, but when I add the activities section the view appears different than the original primary workplace set in the system.

 

When I am in the default workplace that was set in the system, on a mobile device, I am able to toggle in Activities from schedule to list view. In the newly created workplace the calendar options do not appear at the top of the list view screen and there is no option to toggle to the calendar.

Is this normal? There's no documentation indicating this should happen in a new workplace.

Like 0

Like

1 comments

Hi Susan,

 

Thank you for your question!

 

Yes, this is the normal system behavior for now. The thing is you cannot select the calendar view option since you've created a custom workplace. Unfortunately, there is no such option in custom workplaces yet. We've already registered it in our R&D team backlog for consideration and implementation in future application releases. I will assign your case to this project in order to increase its priority. As for now, you should take the setup of the Activities section of the default workplace as an example and recreate it in your custom one to resolve this issue.

 

Best regards,

Anastasiia

Show all comments
Opportunity
mobile application
Mobile app

Can someone help please?

When adding products to an opportunity using the mobile app I expect the amount to update QTY*Price as it does on the web. 

But this doesn't happen?

Like 0

Like

1 comments

Hello Nicola,

 

There are not such functionality on mobile app but is possible to achieve using mobile sdk . This requires development skills.

 

Under the following link You may find more information about mobile sdk:

https://academy.creatio.com/docs/sites/en/files/pdf/node/1524/Business_rules_in_mobile_application_.pdf

 

First of all You have to overwrite mobile application manifest to extend scope of synchronized product fields and add new page extension

 

MobileApplicationManifestDefaultWorkplace

	"SyncOptions": {
		...
		"ModelDataImportConfig": [
			{
				"Name": "Product",
				"SyncColumns": ["Price"]
			},
			...
			]
		}			
 
 
	"Models": {
		.....	
			"OpportunityProductInterest": {
			"RequiredModels": [
				"OpportunityProductInterest",
				"Product"
			],
			"ModelExtensions": [],
			"PagesExtensions": [
				"UsrOpportunityProductInterestMobileBusinessRules"
			]
		}
		....
		}

Next You have to add business rule with calculation Qty*Price triggered when Qty or Product is populated inside new created module

UsrOpportunityProductInterestMobileBusinessRules

 

Unfortunately i don't have any similar example to share but You can analyse this module MobileOpportunityProductInterestModelConfig from Opportunity package

 

Best regards,

Marcin

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 app
mobile

Hi team. There is a option to make this message multiline?

 

Terrasoft.MessageBox.showMessage("asdasf \r\n sdfs")

Like 0

Like

2 comments
 onMyMainButtonClick: function(){
  this.showInformationDialog(" clicked \r\n new line here");
}

Works for me to add a new line. Could you browser be caching something? 

 

keith schmitt,

Is for the mobile schema no for web. Your function is in a web schema.

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: '&lt;div style="color: white; background-color: #8ecb60;  padding-top: 2%;  padding-bottom: 2%;"&gt;SUMMIT FOR APPROVAL&lt;/div&gt;',
                        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