My Requirement is need to be show/hide Purpose list in the lookup based on the master type(Customer, Vendor ) during adding the address details for the customer / vendors.

For customers need to show certain Purpose details list and Vendors need to show certain list.

So i have modified as mentioned below : 

In logistics postal address form, init method assign the purpose string control value. 

Like: rolesCtrl = SysLookupMultiSelectCtrl::construct(element, roles, queryStr(LogisticsLocationRolePostalLookup), true, [tableNum(LogisticsLocationRoleTranslation), fieldNum(LogisticsLocationRoleTranslation, Description)]);

I cannot go for Event handler, because I cant get/access the "rolesCtrl"  global variable. 

But in COC(Extension) am using custom query(XXXLogisticsLocationRolePostalLookup) like:

public void init()
{
next init();
this.rolesCtrl = SysLookupMultiSelectCtrl::construct(this, roles, queryStr(UseLogisticsLocationRolePostalLookup), true, [tableNum(LogisticsLocationRoleTranslation), fieldNum(LogisticsLocationRoleTranslation, Description)]);
}

am getting error: A control with the name 'Roles_Ids' already exists on the form.

Please advise How to do?