Question

Mobile List Sorting

Sorting in setup for mobile do not reflect in actual.



Here's what I did:

//New Module UsrMobileActivityModuleConfig :
Terrasoft.sdk.GridPage.setOrderByColumns("Activity", {
	column: "StartDate",
	orderType: Terrasoft.OrderTypes.DESC
});
 
//MobileApplicationManifestDefaultWorkplace > Models :
"Activity": {
			"RequiredModels": [
				"Activity",
				"ActivityPriority",
				"ActivityType",
				"ActivityCategory",
				"ActivityStatus",
				"CallDirection",
				"ActivityFile",
				"FileGroup",
				"ActivityParticipant",
				"Contact",
				"ActivityParticipantRole"
			],
			"ModelExtensions": [],
			"PagesExtensions": [
				"MobileActivityRecordPageSettingsDefaultWorkplace",
				"UsrMobileActivityModuleConfig"
			]
		},
 
//MobileApplicationManifestDefaultWorkplace > ModelDataImportConfig:
{
				"Name": "Activity",
				"SyncColumns": [
					"Account",
					"Opportunity",
					"StartDate"
				]
},

 

Like 0

Like

5 comments

Hi Solem,

 

I've created the very same rule and test it at the moment and sorting is ascending (tested descending first and then tried ascending and it worked in both cases):

 

--Rule

--Result

If you perform this setup locally try recycle the application pool in IIS and relogin to the mobile application.

Oleg Drobina,



I am installing the maintenance tool to try clearing redis and restarting app_pool.



Can you show me the config for the sort in your module? Not sure if I missed something.

Solem Khan Abdusalam,

 

It's absolutely same as in your example. The code is in my previous messge, here is the text (module name - UsrMobileActivityModuleConfig):

Terrasoft.sdk.GridPage.setOrderByColumns("Activity", {
	column: "StartDate",
	orderType: Terrasoft.OrderTypes.ASC
});

Added into PagesExtension for Activity model:

"Models": {
		"Activity": {
			"RequiredModels": [
				"Activity",
				"ActivityPriority",
				"ActivityType",
				"ActivityCategory",
				"ActivityStatus",
				"CallDirection",
				"SocialMessage",
				"SysFile",
				"FileGroup"
			],
			"ModelExtensions": [],
			"PagesExtensions": [
				"UsrMobileActivityActionsSettingsUsrForTest",
				"UsrMobileActivityGridPageSettingsUsrForTest",
				"UsrMobileActivityRecordPageSettingsUsrForTest",
				"UsrMobileActivityModuleConfig"
			]
		},

After relogin it worked correctly.

Oleg Drobina,



Made a trial account. Tried doing it there and it is not working.

Installed Maintenance tool to clear redis cache and restart app_pool, still not working. This is weird.

Oleg Drobina,



I was able to sort it, Yehey!



Problem is it only worked for Classic View, we are using Mobile Freedom UI where the following is not working:

 

Terrasoft.sdk.GridPage.setOrderByColumns
Terrasoft.sdk.RecordPage.configureEmbeddedDetail

Do you have any idea how to sort in Freedom UI for Mobile?

Show all comments