Code: Select all
$Self->{CustomerCompany2} = {
Name => 'SugarCRMAccounts',
Module => 'Kernel::System::CustomerCompany::DB',
Params => {# ---------------------------------------------------- #
# needed system stuff (don't edit this) #
# Type => 'mssql', # only for ODBC connections# ---------------------------------------------------- #
DSN => 'DBI:mysql:database=itpsugar;host=x.x.x.x', #use base qw(Kernel::Config::Defaults)
User => 'root',
Password => 'xxxxxxxx',# -----------------------------------------------------#
# $SQL .= " FROM $Self->{CustomerTable} WHERE ";
#Table => 'customer_user LEFT JOIN address_table ON customer_user.column_name=address_table.column_name ',1;
Table => 'account LEFT JOIN account_cstm ON account.id=account_cstm.id_c',
},
# customer unique id
CustomerKey => 'id',
# customer #
CustomerID => 'itp_crm_account_id_c',
CustomerCompanyListFields => [ 'itp_crm_account_id_c', 'name' ],
CustomerCompanySearchFields => ['itp_crm_account_id_c', 'name'],
CustomerCompanySearchPrefix => '',
CustomerCompanySearchSuffix => '*',
CustomerCompanySearchListLimit => 250,
CacheTTL => 0, # use 0 to turn off cache
# show not own tickets in customer panel, CompanyTickets
CustomerUserExcludePrimaryCustomerID => 0,
Map => [
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
[ 'CustomerID', 'CustomerID', 'itp_crm_account_id_c', 1, 1, 'var', '', 1 ],
[ 'CustomerCompanyName', 'Customer', 'name', 1, 1, 'var', '', 1 ],
[ 'CustomerCompanyStreet', 'Street', 'shipping_address_street', 1, 0, 'var', '', 1 ],
[ 'CustomerCompanyZIP', 'Zip', 'shipping_address_postalcode', 1, 0, 'var', '', 1 ],
[ 'CustomerCompanyCity', 'City', 'shipping_address_city', 1, 0, 'var', '', 1 ],
[ 'CustomerCompanyCountry', 'Country', 'shipping_address_country', 1, 0, 'var', '', 1 ],
[ 'CustomerCompanyURL', 'URL', 'website', 1, 0, 'var', '[% Data.CustomerCompanyURL | html %]', 0 ],
[ 'CustomerCompanyComment', 'Comment', 'description', 1, 0, 'var', '', 1 ],
[ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int', '', 1 ],
],
};
As far as I understand, I have already added the CustomerCompanyKey which is the line: CustomerKey => 'id'. What else am I missing?