Hi Team,

 

I'm trying to extend a base function in my custom controller. And the code is loading once I open the page but is not triggering the function. Is this the correct way? What I'm doing wrong in this case?

So I have the custom controller created in this way:

Ext.define("Terrasoft.configuration.controller.SMAgilizExpenseManagementGridPage", {
	extend: "Terrasoft.controller.BaseGridPage",
 
	statics: {
		Model: AgilizExpenseManagement
	},
 
	config: {
		refs: {
			view: "#AgilizExpenseManagementGridPage"
		}
	},
 
	/**
	 * @inheritdoc
	 * @protected
	 * @overridden
	 */
		getChangeModeOperations: function() {
		var detailConfig = this.getDetailConfig();
		if (detailConfig) {
			var parentRecord = detailConfig.parentRecord;
			if (parentRecord.get("IsNonActualEmail") === false) {
				return {
					canCreate: false,
					canUpdate: false,
					canDelete: false
				};
			}
		}
		return this.callParent(arguments);
	},
	initializeQueryConfig: function() {
		this.callParent(arguments);
		var gridQueryConfig = this.getQueryConfig();
		gridQueryConfig.addColumns(this.startDateColumnName, this.endDateColumnName);
		if (Terrasoft.FeatureUtils.isHybridMode()) {
			gridQueryConfig.setIsBatch(false);
		}
	},
 
});

And is added in the MobileApplicationManifestDefaultWorkplace as well:

 

 

Like 0

Like

7 comments
Best reply

 Hi Oscar, I solve it with this code. We change the extend for override. Of course this override for the entire app but works for me :)

Ext.define("Terrasoft.controller.AgilizExpenseManagement", {
	override: "Terrasoft.controller.BaseModelPage",
 
	statics: {
		Model: AgilizExpenseManagement
	},
	/**
	 * @inheritdoc
	 * @protected
	 * @overridden
	 */
		getChangeModeOperations: function() {
		var detailConfig = this.getDetailConfig();
		if (detailConfig && detailConfig.parentRecord.data.AgilizExpenseStatus.id) {
			var parentRecord = detailConfig.parentRecord;
			if ( parentRecord.data.AgilizExpenseStatus.id && parentRecord.data.AgilizExpenseStatus.id !== "f50b9fd6-21ed-47ff-8450-e7f5f9c82c5f") {
 
				return {
					canCreate: false,
					canUpdate: false,
					canDelete: false
				};
			}
		}
		return this.callParent(arguments);
	}
 
});

 

​Hi Federico,



This method is a part of the BaseModelPage controller:

Try extending the Terrasoft.controller.BaseModelPage. Also please check if the extended module is added to the CustomSchemas sync option in the manifest.

Best regards,

Oscar

Hi Oscar Dylan,

I try to add the BaseModelPage in extended but still is calling the base one. The schema is loading in the debbuger but is not trigged the function. I added in the customschemas as well.

 

Something is missing in my code?

 

Ext.define("Terrasoft.controller.SMAgilizExpenseManagement", {
	extend: "Terrasoft.controller.BaseModelPage",
 
	statics: {
		Model: AgilizExpenseManagement
	},
	/**
	 * @inheritdoc
	 * @protected
	 * @overridden
	 */
		getChangeModeOperations: function() {
			window.alert("Test");
		var detailConfig = this.getDetailConfig();
		if (detailConfig) {
			var parentRecord = detailConfig.parentRecord;
			if (parentRecord.get("IsNonActualEmail") === false) {
 
				return {
					canCreate: false,
					canUpdate: false,
					canDelete: false
				};
			}
		}
		return this.callParent(arguments);
	}
 
});

 

 

I tried to extend the controller in many ways but looks is not working. Somebody have a example to share?

Federico Buffa ...,

 

Hi,

 

I am studying the base AccountPreviewPage code to give you an example of the controller extension. Please give me a couple of days and I will return to you with an update.

 

Meanwhile if someone has an example - it would also help us much!

 

Best regards,

Oscar

 Hi Oscar, I solve it with this code. We change the extend for override. Of course this override for the entire app but works for me :)

Ext.define("Terrasoft.controller.AgilizExpenseManagement", {
	override: "Terrasoft.controller.BaseModelPage",
 
	statics: {
		Model: AgilizExpenseManagement
	},
	/**
	 * @inheritdoc
	 * @protected
	 * @overridden
	 */
		getChangeModeOperations: function() {
		var detailConfig = this.getDetailConfig();
		if (detailConfig && detailConfig.parentRecord.data.AgilizExpenseStatus.id) {
			var parentRecord = detailConfig.parentRecord;
			if ( parentRecord.data.AgilizExpenseStatus.id && parentRecord.data.AgilizExpenseStatus.id !== "f50b9fd6-21ed-47ff-8450-e7f5f9c82c5f") {
 
				return {
					canCreate: false,
					canUpdate: false,
					canDelete: false
				};
			}
		}
		return this.callParent(arguments);
	}
 
});

 

Looks the function is working for the fields but no for the button edit. I can't find the logic for that.

this solutions works to hide the edit button if the permission canUpdate is false

Ext.define("Terrasoft.controller.AgilizExpenseManagementPreviewPage", {
	override: "Terrasoft.controller.BasePreviewPage",
 
 
	initNavigationButtons: function() {
		this.callParent(arguments);
		let view = this.getView();
		if (this.getChangeModeOperations().canUpdate && view.getEditButton()) {
			let editButton = view.showEditButton(true);
			editButton.on("tap", this.onEditButtonTap, this);
		} else {
			view.showEditButton(false);
		}
	}
 
});

 

Show all comments

Hi Team,

Would be great to have the possibility to add the business rules from the Mobile application wizard like we can do right now in the edit pages on web,

 

Thanks,

 

1 comments

Hello Federico,



Thank you so much for your idea. We've registered it in our R&D team backlog for consideration and implementation in the future application releases.

 

Thank you for helping us to improve our product. 

 

Best regards,

Bogdan

Show all comments

Hi Team!

In mobile fields by default in the section list or view page mode is only showing the fields completed or not null. There is a way to change that? Show all the fields even if are null?

 

For example here in activities is not showing call notes, only when you are in edit mode.

 

Like 0

Like

3 comments
Best reply

Hello Federico,

 

Hope you're doing well.

 

This is default mobile application behavior. Empty fields always remain invisible in case they are not filled in. This logic can be changed with the help of development only. It would be necessary to override the Terrasoft.controller.BasePreviewPage of the method doChangeField in all pages like this:

doChangeField: function(field, newValue, executeRulesCallback) {
                       this.callParent(arguments);
                       field.show();
}

Best regards,

Roman

Hello Federico,

 

Hope you're doing well.

 

This is default mobile application behavior. Empty fields always remain invisible in case they are not filled in. This logic can be changed with the help of development only. It would be necessary to override the Terrasoft.controller.BasePreviewPage of the method doChangeField in all pages like this:

doChangeField: function(field, newValue, executeRulesCallback) {
                       this.callParent(arguments);
                       field.show();
}

Best regards,

Roman

Roman Rak, Thanks, that can be apply only for a specific object?

I just create a new controller for the specific schema and works. Thanks

 

Show all comments

Hello,

I'm setting up the Mobile App with VERY FEW sections (contact, accounts, activities)

 

Since we have areas with no connection....I need to set the OFFLINE mode (using 7.17).

 

When I first start the APP, it seems to be loading ALL objects (orders, products, etc...) which take a lot of time/resources.

 

Can we RESTRICT some objects to be loaded when I don't use the section in the App ?

 

Hope I'm clear enough.

Thanks

 

Like 0

Like

2 comments

Hi Francois,

 

This usually happens if there are more than 1 workplace set for the Mobile App. The best way is to check your Mobile wizard and see if any of those sections linked to any of the workplaces.

I double checked and nothing is refering to the order. (I only kept Account/Contact/Activity/Lead.  The data that I'm showing does not call ORDERs or Products in Orders) 



But I still see :  Importing data (OrderProduct) = over 2 Millions records.

 

Can we limit the amount of Order records  (Today's data ONLY) ?

 

Show all comments

Dear community,

 

I have generated a custom detail on my mobile app. 

The detail contains a name for the object and other fields: such as a field with the year. 

In the same detail more items can be collected. In the web platform these items can be ordered by the column that I choose: name, year, status, ecc.

In the mobile app these items appear in a random order (they are not sorted alphabetically or by year) and I am not able to set the order rule anywhere. 

 

How can I change the order on which these items appear on the mobile app? 

 

Best regards, 

Clara 

Like 0

Like

4 comments

Dear Clara,

 

Sorting is present only in the out-of-the-box sections and only in the out-of-the-box workplace “Main workplace”. Sorting is implemented at the code level that can be inspected in mobile%sectionname%moduleconf.js file. As for now, any changes to sorting functionality can be done only with development. 

 

I'll inform our R&D team about this issue and suggest they implement it. Thank you for helping us to make our application better!

 

Best regards,

Bogdan

Hi Bogdan,

 

I am trying to order the detail with javascript. I have generated a new module with the following code:

Terrasoft.sdk.RecordPage.setOrderByColumns("VTaDossierFeeDetailEmbeddedDetail", [{
    column: "VTaName",
    orderType: Terrasoft.OrderTypes.DESC
}]);

The "VTaDossierFeeDetailEmbeddedDetail" is my detail in the mobile app regarding the custom object "Entity_Fee" that I want to be ordered by the Name.

 

Then I inserted my code in the "MobileApplicationManifestDefaultWorkplace". First I tried to call the module in the "PageExtensions" of my object "VTaDossier" and after I also tried to call it in the "ModelExtensions" but it didn't work.

On the mobile the record are ordered as they compare in the DB.

 

I tried also to add a similar code to the "Entity_Fee" like this:

Terrasoft.sdk.GridPage.setOrderByColumns("VTaEntity_Fee", [{
    column: "VTaName",
    orderType: Terrasoft.OrderTypes.DESC
}]); 

In this case I wanted to change the order of the object in the Grid Page, but the same the list was not ordered by name. 

 

I wonder if I'm adding it in the wrong place. 

Can you give me some suggestions?

 

Thanks,

Clara

 

 

Clara Fioranzato,

 

The code seems to be correct.

 

The schema with the code should be added to the "PagesExtension". 

 

Also, please try to restart your application after these changes, some 

metadata may have been cached.

 

Best Regards, 

 

Bogdan L.

 

Bogdan,

I am also trying to order the mobile app lists.  This is necessary functionality!

Show all comments

Hi Community!

 

We use LDAP with SSO as authentication in our customer's onprem installation.

So the users are used to log in using their Windows username and password and don't have a separate creatio login.

However, the creatio app doesn't support this login method, which is understandable, since there is now windows user context on the phone.

 

I was wondering how others are dealing with this problem. Is it even possible to use LDAP and creatio authentication side-by-side, because it seems to be either or?

Thanks,

Robert

Like 0

Like

6 comments

Dear Robert, 



Yes, it's possible to enter the mobile application in case if you have SSO configured on your website and it is set as a default login method. 

In order to enable SSO in mobile application you need to enable the system setting with code "MobileUseSSO"



Kind regards,

Roman

Roman Brown,

Hi,

we have enabled the option and the "login as domain user" link appears in the App!

 

However, we get the following error message when trying to log in with the domain users:

 

 

Is there something special to set up on IIS maybe, besides the Windows Authentication?

 

Thanks and best regards,

Robert

Dear Robert, 



Can you please register a case for our support team so we could check the LDAP configuration? Cause there can be several reasons for such error message. 



Kind regards,

Roman

Roman Brown,

Hi Roman,

 

it's an on-prem installation, so that will not work really...

LDAP is working in the browser, so I guess it is set up correctly.

 

Any hints?

 

Thanks,

Robert

Dear Robert, 



The option to login as a domain user is option available as part of NTLM authentication which isn't available in mobile app. 

For application you can use standard, SSO or LDAP authentication. 



Thank you. 

Roman Brown,

Dear Roman,

how can we use LDAP users with NTLM authentication on mobile?

Because as I have written in my original post, there is no option to set a password when selecting the LDAP option.

 

What is the system setting "MobileUseSSO" is exactly expected to do?

 

Thanks,

Robert

Show all comments

My customer doesn't want to use the communication options, because he just wants to have only one phone number, one mail-address etc.

I created new text fields, respectively we use the standard phone fields on the account entity. I placed this fields in a new field group called "Communication options".

One the normal "web client" we have no problem. With a little bit of configuration in the AccountPageV2 we have some clickable fields on the page.

But I have no idea how to configure this for the mobile client. 

Has anyone implemented something like this before?

Like 1

Like

3 comments
Best reply

Hi Christian,

I assume what you're referring to is making the phone field a clickable field to dial the number in mobile, is this right? 

To do this, you need to first create a module for the account model pages extensions. See https://customerfx.com/article/creating-modules-for-the-creatio-mobile-…

Once that is created, you can add the following to the new module to make the phone field a clickable phone field (in the code below, this is for a field named "Phone" on the Account page. If your phone field is named something else like "UsrOtherPhone", you'd replace the "Phone" in the top line with that instead):

Terrasoft.sdk.RecordPage.configureColumn("Account", "primaryColumnSet", "Phone", {
	viewType: Terrasoft.ViewTypes.Phone
});

Also, this code above also assumes the phone field is in the primary column set. This is the name of the main column group of a page, however it’s possible to create other column groups. If you’ve created another column set that you've added the field to, locate the record page for the Account page that was created by the mobile wizard in the configuration. The record page will be named [Prefix + “Mobile” + EntityName + “RecordPageSettings” + WorkplaceName]. Then you can open that and see the actual name of your column set and replace "primaryColumnSet" in the code above with this name.

Ryan

Hi Christian,

I assume what you're referring to is making the phone field a clickable field to dial the number in mobile, is this right? 

To do this, you need to first create a module for the account model pages extensions. See https://customerfx.com/article/creating-modules-for-the-creatio-mobile-…

Once that is created, you can add the following to the new module to make the phone field a clickable phone field (in the code below, this is for a field named "Phone" on the Account page. If your phone field is named something else like "UsrOtherPhone", you'd replace the "Phone" in the top line with that instead):

Terrasoft.sdk.RecordPage.configureColumn("Account", "primaryColumnSet", "Phone", {
	viewType: Terrasoft.ViewTypes.Phone
});

Also, this code above also assumes the phone field is in the primary column set. This is the name of the main column group of a page, however it’s possible to create other column groups. If you’ve created another column set that you've added the field to, locate the record page for the Account page that was created by the mobile wizard in the configuration. The record page will be named [Prefix + “Mobile” + EntityName + “RecordPageSettings” + WorkplaceName]. Then you can open that and see the actual name of your column set and replace "primaryColumnSet" in the code above with this name.

Ryan

Hello. thanks for your detailed reply. At the moment I'm on vacation. I will try it as soon as possible. Best regards Chris

Ryan Farley,

I tried your solution and it works perfect.

Many thanks for your help

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