Sorting Communication Options Types Alphabetically

Hello all,


Is there a way that I can have the communication options sorted alphabetically for users?

Like 0



Dear Kevin,


Here is the example:


You can add the "order" attribute for every field that you need to sort to the edit page schema where the field is located.

In the following example we created the integer "UsrSorting" field in the lookup UsrTestLookup1 and copied the values from the "Name" field there.

attributes: {
            "UsrTestLookup1": {
                lookupListConfig: {
                    orders: [
                            columnPath: "UsrSorting",
                            direction: Terrasoft.OrderDirection.ASC

The result -


You can try to implement the same logic to the 'Communication option types by communication type' lookup.





That is great and I've seen that use before. However, I cannot find the correct name in order to reference the communication type lookup.

Dear Kevin,


In order to sort the communications options please do the following:

1. Create a replacing client module for the “ContactCommunicationDetail” schema.

2. Add the following code to the schema:


define("ContactCommunicationDetail", [], function(){
        methods: {
            initCommunicationTypes: function(callback){
                var esq = this.Ext.create("Terrasoft.EntitySchemaQuery", {
                        rootSchemaName: "CommunicationType",
                        isDistinct: true
                esq.addMacrosColumn(this.Terrasoft.QueryMacrosType.PRIMARY_COLUMN, "Id");
                var nameColumn = esq.addMacrosColumn(this.Terrasoft.QueryMacrosType.PRIMARY_DISPLAY_COLUMN, "Name");
                nameColumn.orderDirection = Terrasoft.OrderDirection.ASC;
                esq.addColumn("[ComTypebyCommunication:CommunicationType:Id].Communication", "CommunicationId");
                esq.getEntityCollection(function(response) {
                    if (response.success) {
                        var entityCollection = response.collection;
                        this.set("CommunicationTypes", entityCollection);
                }, this);


Best regards,


Show all comments