Some of those roles are the result of relations in various tables pointing to PartyRole instead of RoleType. So, no - you can't delete those roles without generating foreign key violations.

An alternative that I like to use is redefining the problematic tables to drop the relation to PartyRole and relate them to RoleType instead. With that approach, a party can be related to a bit of data in a certain role without the party being in that role within the enterprise.

-Adrian

On 10/20/2011 2:02 PM, Rishi Solanki wrote:
Hi Folks,
Recently I was looking into the supplier data for an organization and its
associated roles.
Please have a look at -
https://demo-trunk.ofbiz.apache.org:8443/partymgr/control/viewroles?partyId=DemoSupplier

Roles associated to this party are ACCOUNT, SUPPLIER_AGENT, SUPPLIER,
BILL_FROM_VENDOR, and SHIP_FROM_VENDOR.
I'm fine with the SUPPLIER, BILL_FROM_VENDOR and SHIP_FROM_VENDOR roles,
just wanted to discuss on the ACCOUNT and SUPPLIER_AGENT role.

I'm not sure about the ACCOUNT role and SUPPLIER_AGENT role assigned to
DemoSupplier, for SUPPLIER_AGENT role is sub type of ORGANIZATION_ROLE
(refer RoleType entity) as per data setup for roleTypeId, so this should not
be role of an organization. Do not have points on ACCOUNT role, but wanted
to know why will need to add this role and which functionality needs this
role for supplier.

  Please let me know If I can delete the SUPPLIER_AGENT role from data and
submit the patch. And also let me know what is the purpose of ACCOUNT role
here.

Thanks!

Rishi Solanki
Manager, Enterprise Software Development
HotWax Media Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxmedia.com

Reply via email to