AnsweredAssumed Answered

Help with custom index for checking for dupes on import (logical AND)

Question asked by Steve Cox on Nov 15, 2017
Latest reply on Nov 22, 2017 by Steve Cox

Hi,

 

I'm trying to use multiple indexes to dupe check on an account import, in this case, account name, billing city, billing country and a custom field. If I drag all three over to the left, it treats them as 'OR' - so a dupe is matched if country is the same OR city OR name.

 

So, I've been trying to add a custom non-db index that is a join of these three.

 

I've followed the instructions here:

http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.7/Data_Framework/Vardefs/Working_With_… 

 

However, it doesnt' appear in the list - and I'm not sure how the index name is generated for the dupe condition as the name in the vardef is the index name (there is no label).

 

The code is:

 

$dictionary['Account']['indices'][] = array(
'name' => 'idx_product_name_city_country_cstm',
'type' => 'index',
'fields' => array(
0 => 'mm_accounts_prod_field_c',
1 => 'name',
2 => 'billing_address_city',
3 => 'billing_address_country'
),
'source' => 'non-db',
);

Thanks

Outcomes