In a Freshdesk testing environment, the following SQL statement copies all contact persons involved with a sales order from Exact Online to Freshdesk:
insert into contacts@freshdesk
( name
, address
, phone
, email
)
select delivery_account_name
, fulladdress
, account_phone
, account_email
from freshdesktickets@inmemorystorage
The following SQL is used to prepare the Freshdesk tickets on basis of Exact Online:
create table FreshdeskTickets@inmemorystorage
as
select dlvl.delivery_account_name
, acad.fulladdress,acad.account_phone
, acad.account_email
from ExactonlineXML..DeliveryLines@eolnl dlvl
join fulladdress@inmemorystorage acad
on acad.id_attr = dlvl.delivery_deliveryaddress_id_attr
where dlvl.deliverydate_attr = '2016-10-07'
group
by dlvl.delivery_account_name
, acad.fulladdress
, acad.account_phone
, acad.account_email
This runs with no problems. When I execute this SQL statement on the Freshdesk environment of the customer, I receive an error with code itgenoda001 (see picture): Validation failed. All messages: invalid_value: exact_koppeling: It should be one of these values: 'Ja,Nee'
Obviously there are different versions of Freshdesk in use. How can I adapt my query such that works fine on both versions?