Hello all,

 

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

Like 0

Like

3 comments

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. 

https://prnt.sc/kg623a

attributes: {

            "UsrTestLookup1": {

                lookupListConfig: {

                    orders: [

                        {

                            columnPath: "UsrSorting",

                            direction: Terrasoft.OrderDirection.ASC

                        }

                    ]

                }

            }

        },

The result - https://prnt.sc/kg62ci

 

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

 

Regards,

Dean

 

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(){

    return{

        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");

                this.initCommunicationTypesFilters(esq);

                esq.getEntityCollection(function(response) {

                    if (response.success) {

                        var entityCollection = response.collection;

                        this.set("CommunicationTypes", entityCollection);

                    }

                    callback.call(this);

                }, this);

            }

        }    

    };    

});

 

Best regards,

Norton

Show all comments

How can I add another type of the Phone to be added to our Contacts, let’s say ‘Personal Phone’? 

File attachments

Like

1 comments

You need to register the ‘Communication Option Type’ Lookup in the ‘Lookups’ Section to be able to manage them for both ‘Contacts’ and ‘Accounts Section’.

To do that click ‘Add’, enter the ‘Communication Option Type’ into ‘Name’ and ‘Object’ fields and click ‘Ok’. If you get any warnings – just ignore them:

After this, you will be able to ‘Open’ this Lookup and Add\Edit\Delete the values.

In your case it will look like this:

Good Luck!

Show all comments