Hello,



I am trying to sort list in Mobile.



I was able to sort Detail List, the list located in Section > Related/History Tab, but the sorting algo won't take effect in the Section List and Embedded Detail.



Here's my other post: https://community.creatio.com/questions/mobile-list-sorting

 

What am I missing here? Is sorting only available for Related/History Tab detail list?

Like 0

Like

2 comments

Update:



I was able to make it worked but only for Classic Mobile UI.



I need something like Terrasoft.sdk.RecordPage.configureEmbeddedDetail that will work for Freedom UI in mobile.

Hello Solem Khan,

1. Prepare JSON sorting config:

"sortingConfig": {
    "default": [
         {"columnName": "Name", "direction": "desc"}
     ],
}

2. Prepare diff for viewModelConfig. Actually, add sortingConfig to viewModelConfig → attributes → Items → modelConfig.

[
 {
  "operation":"insert",
  "name":"Attribute_Items_SortingConfig",
  "parentName":"Attribute_Items_ModelConfig",
  "propertyName":"sortingConfig",
  "values":{
   "default":[
    {
     "columnName":"Name",
     "direction":"desc"
    }
    ]
  }
 }
]

3. Add this diff to scheme. For instance, open scheme MobileFUIUsrSectionGridPageSettingsDefaultWorkplace and add diff to section with name = "settings" in block values (in “stringified” format):

"viewModelConfigDiff": "[{\"operation\":\"insert\",\"name\":\"Attribute_Items_SortingConfig\",\"parentName\":\"Attribute_Items_ModelConfig\",\"propertyName\":\"sortingConfig\",\"values\":{\"default\":[{\"columnName\":\"Name\",\"direction\":\"desc\"}]}}]"

If it’s needed to sort by several columns, set configs in “default“ property like this:

"viewModelConfigDiff": "[{\"operation\":\"merge\",\"name\":\"Attribute_ContactCareerDetailV2EmbeddedDetail_SortingConfig\",\"values\":{\"default\":[{\"columnName\":\"StartDate\",\"direction\":\"desc\"},{\"columnName\":\"Primary\",\"direction\":\"desc\"}]}}]"

Best regards, Anhelina!

Show all comments

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

I want to remove the ability to add new records in lookup in mobile .

How can i hide the "+" button ?

Like 0

Like

1 comments

Hello,

Could you please clarify where exactly you want to hide "+" sign, because I can't find such in any of basic lookups. Add a screenshot if possible.

Thank you in advance!

Show all comments

I am trying to get the current user role in mobile but it is not working !

 

Terrasoft.sdk.Model.addBusinessRule("Activity", {

  name: "GetRoleFromtheUser",

  ruleType: Terrasoft.RuleTypes.Custom,

  triggeredByColumns: ["UsrVisitType","UsrTypeDeVisiteManager"],

  events: [Terrasoft.BusinessRuleEvents.ValueChanged, Terrasoft.BusinessRuleEvents.Save],

  executeFn: function(record, rule, column, customData, callbackConfig) {



    var myrecord = record; 

    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 role = loadedRecord.get('SMRoleName');                                                                                                    

          if (role=='Sales Management') {                                                                                                                   

            record.changeProperty("UsrVisitType", {

                 hidden: true,

              readOnly: true

               });

          }else{

            record.changeProperty("UsrTypeDeVisiteManager", {

                 hidden: true

               });

          }

          }

        },

      });



Ext.callback(callbackConfig.success, callbackConfig.scope, [hidden,readOnly]); 

  }

});

Any idea please ?

Like 1

Like

1 comments

Hello!

You’re thinking in a right way and I would recommend you to change the logic of getting the role a bit. I tested this code on basic table SysAdminUnitInRole where we have a column SysAdminUnitRoleId

var currentUser =Terrasoft.CurrentUserInfo.userId;
var store = Ext.create('Terrasoft.store.BaseStore', {
  model: 'SysAdminUnitInRole'
});
var queryConfig = Ext.create('Terrasoft.QueryConfig', {
  columns: ['SysAdminUnitRoleId'],
  modelName: 'SysAdminUnitInRole'
});

Variable records structure looks like this:

 

And each class contains SysAdminUnitRoleId:

 

I used ID from loadedRecord.get('SysAdminUnitRoleId') and it works for me to see the role. You can do it in two ways:

  1. Create a loop for each “records” element and check if SysAdminUnitRoleId is equal to the user's current role id
  2. If you want to use “role=='Sales Management'” you can create a new object to display extensions of ID and role names.

P.S. Check if you added models to MobileApplicationManifestDefaultWorkplace:

"Models": { 
			"Activity": {
			"RequiredModels": ["SysAdminUnitInRole"],
			"ModelExtensions": ["UsrActivityModel"],
			"PagesExtensions": []
		}
	},

 

Show all comments

Hi Community,

 

What is the correct syntax to add multiple or array of filter to store.loadPage in mobile. We've tried below but it is not working.

Like 0

Like

1 comments

Hello Fulgen,

 

Something like that:

...
var filtersConfig = {
				type: Terrasoft.FilterTypes.Group,
				logicalOperation: Terrasoft.FilterLogicalOperations.And,
				subfilters: [
					{
						property: "Order",
						value: currentOrderId
					},
					{
						property: "Product",
						value: productId
					}
				]
			};
...
store.loadPage(1, {
			isCancelable: true,
			filters: Ext.create("Terrasoft.Filter", filtersConfig),
			queryConfig: queryConfig,
			callback: function(loadedRecords, operation, success) {
...

 

Show all comments

I have been trying to remove the preview page from mobile app.

When I select on record i want to go directly to edit page and not preview page.

I tried to add this code to my Manifest, but it did not work:

Like 0

Like

4 comments

Hello,

 

8.0 interface account page has no preview page and edit page is opened automatically for it. So there is no need to remove preview page from this model.

Oleg Drobina

Hello,

then what is the solution ?

There is solution for this with the old versions?

Hello. I found a solution. You need to extend the grid controller and replace the openpreview to this:

That will open directly the edit page.

Show all comments

I'm trying to add a default filter to my account grid page in the mobile app so that it only imports accounts owned by the current user.

I've tried multiple solutions, but nothing worked, and this is my last one:

Like 0

Like

1 comments

Hello,

In order to add such filter you need to create a new module in the configuration with this code:

 Terrasoft.sdk.Module.addFilter("Account", Ext.create("Terrasoft.Filter", {
    type: Terrasoft.FilterTypes.Group,
    subfilters: [
		Ext.create("Terrasoft.Filter", {
			compareType: Terrasoft.ComparisonTypes.Equal,
			property: "Owner",
			valueIsMacros: true,
			value: "Terrasoft.ValueMacros.CurrentUserContactId"
		})
	]
}));

After this, you need to connect this module in the Manifest schema:

	"Models": {
		"Account": {
			"RequiredModels": [
				------
			],
			"ModelExtensions": [],
			"PagesExtensions": [
				--------,
				"UsrAccountOwnerFilterMobile"
			]
		}
	},

 

Show all comments

I have tried to add a business rule in app, when the page is in "freedom UI" mode it does not work, but when i uncheck the freedom UI it works.

Same when adding actions to mobile!

Like 0

Like

2 comments

FreedomUI mobile for now supports business rules for the object job can set it with a business rule designer. Page business rules for mobile FreedomUI can set up only in metadata mode.

Web pages are Classic or Freedom UI? Business rules for object work only if you use Freedom UI in mobile and web versions (if web version pages are classic and only mobile is Freedom it doesn't work).

Show all comments

I want to show column with cdde "UsrCapacite_camion" when field with code "UsrSegmentClient"=Distribution .

This is my code :

and here is my manifest:

Like 0

Like

6 comments

Hello,

 

It seems that the UsrSegmentClient column is a lookup and you need to use an actual Id here, not display value of the lookup (in the value: 'Distribution' part specify an actual Id of the record instead of the 'Distribution' value). That's why the rule doesn't do anything.

Oleg Drobina,

Hello,

Nothing changed unfortunately

!

 

developer,

 

Hello,

 

Indeed, tested the same locally and it didn't work. I've discussed this with our R&D team and in FreedomUI old approach with mobile app business rules won't work anymore, only in old UI. They also have a task to make it possible to develop business rules in Freedom UI using standard wizard in mobile app and they've prioritized this task.

Oleg Drobina,

Hi,



I read in 8.0.8 release, that 'Creatio mobile app now supports the operation of object-level business rules both online and offline.'



But as I've tried to use Object-level business rules, they works in web app, and don't work in mobile app (in both online and offline mode)



What then was mentioned in release note?



Kind regards,

Vladimir

Hi,



Any updates about business rules in mobile application using freedom ui ? as the business rules work only on old UI what approach to follow ?



Thank you in advance for your time and help,

Malek Sghaier,

 

If these are general business rules, it is better to configure them at the object level. In both mobile and web applications, these rules complement each other. Please find more information here

 

Business rules for the page itself can only be configured through metadata development.

 

 

 

 

Show all comments

Hi guys, did anyone try to integrate mapsly to Creatio mobile?

I need some guidance !

Is it only possible with adding Mapsly's Iframe ?

If yes where should i put the iframe ? in which Creatio schema ?

Thank you 

Like 0

Like

1 comments

Hello, in this case, we recommend reaching out to the technical support of Mapsly. You can use this email: help@mapsly.com 

Show all comments