Sorting Country Selection

By | April 16, 2011

In Sage CRM the selection lists like country is sorted aphetically. “So how else do you expect it to be” would be the next question, isn’t it. But say, your most or all customers are in US or Canada and every time you create a new customer you have to scroll till you reach US or other country.

One way to avoid the scrolling would be to remove all the countries and just keep the ones you have the customers located. But this list can also be very long. If you need to set a couple of countries like US or Canada right at the top of the list so that it becomes easy for the user to select it while creating or updating records.

To achieve this functionality under Sage CRM we have following alternative steps given below.

1) Log in to Sage CRM.

2) Go to Administration-> Customization -> Secondary Entity (drop down list) -> Address ->Fields.

3) Set the position of the country in selection list.

4) Click on the save button.

5) Please refer the below query to check the order of country you have set in Sage CRM

select Capt_Code,Capt_US,Capt_Order from Custom_Captions where Capt_Family=’addr_country’ and capt_deleted is null order by Capt_Order asc

6) Ideally if you change the order the list should change automatically but it does not as the list is sorted based on country name. Hence we will have to do some client side scripting to move the names of the country to top or bottom.

A less elegant solution but effective would be to have a single in the beginning of the caption names for US and Canada so that they will be displayed on top once the list is sorted by name.