After update eWay-CRM to the 3.9 version, the Country field in the Company window changed from text field to select list - some countries weren't transferred
Description
In the case that the country in the Company window is not filled after the eWay-CRM update to the 3.9 version, it is probable that the country was previously inserted incorrectly, so our transfer mechanism cannot use it.
Version
eWay-CRM v. 3.9 and higher
Difficulty
High
Resolution
Before any change, we recommend you to stop the Web Service and eWayTimer and make a backup of your database!
At first, we need to find countries without filled country using a select:
SELECT Address1Country FROM EWD_Companies WHERE Address1CountryEn IS NULL
You need to find all countries that weren't inserted.
Then, you display all countries in the EWD_EnumValues table by EnumType.
Select a country by its Cs or En name and find out its FileAs name. E.g., the United Kingdom has GB as a FileAs name.
Open the 1553 update script (can be downloaded here), copy it and make a new task to the server in the SQL management. Insert the script into it.
We need mainly this part:
INSERT INTO #CustomMapping (Code, CustomText) SELECT N'US', N'USA' UNION ALL SELECT N'US', N'Amerika' UNION ALL SELECT N'SK', N'SVK' UNION ALL SELECT N'CZ', N'ČR' UNION ALL
This part needs to be edited by adding missing countries like this:
INSERT INTO #CustomMapping (Code, CustomText) SELECT N'US', N'USA' UNION ALL SELECT N'US', N'Amerika' UNION ALL SELECT N'SK', N'SVK' UNION ALL SELECT N'CZ', N'ČR' UNION ALL SELECT N'GB', N'United Kingdom'
I recommend to open the script in a transaction and see whether changes are successfully added.
If the country is successfully added, you need to launch eWayTimer and the Web Service again.