Hi Guys,

I was trying to work out how to create a relationship between a user and
a company but I am getting an error - I am not a 100% sure if its my
error in selecting the wrong stuff or if its a bug so a little bit of
help would be great!

First go to this page -
https://demo.ofbiz.org/partymgr/control/EditPartyRelationships?partyId=DemoCustAgent
then in the "Add other party relationship" select
- in the role of = Sales Representative
- is A = Employee
- From Party ID = DemoCustCompany
- in the role of = Manufacturer
everything should be blank and then click Submit

I get the following error:
ERROR: Could not complete the createPartyRelationship
[file:/demo/deployments/demo-20091217-0306/applications/party/script/org/ofbiz/party/party/PartyServices.xml#createPartyRelationship]
process [problem creating the newEntity value: Error while inserting:
[GenericEntity:PartyRelationship][comments,null()][createdStamp,2009-12-17
12:56:36.512(java.sql.Timestamp)][createdTxStamp,2009-12-17
12:56:36.343(java.sql.Timestamp)][fromDate,2009-12-17
12:56:36.493(java.sql.Timestamp)][lastUpdatedStamp,2009-12-17
12:56:36.512(java.sql.Timestamp)][lastUpdatedTxStamp,2009-12-17
12:56:36.343(java.sql.Timestamp)][partyIdFrom,DemoCustCompany(java.lang.String)][partyIdTo,DemoCustAgent(java.lang.String)][partyRelationshipTypeId,EMPLOYMENT(java.lang.String)][roleTypeIdFrom,MANUFACTURER(java.lang.String)][roleTypeIdTo,SALES_REP(java.lang.String)][statusId,null()][thruDate,null()]
(SQL Exception while executing the following:INSERT INTO
OFBIZ.PARTY_RELATIONSHIP (PARTY_ID_FROM, PARTY_ID_TO, ROLE_TYPE_ID_FROM,
ROLE_TYPE_ID_TO, FROM_DATE, THRU_DATE, STATUS_ID, RELATIONSHIP_NAME,
SECURITY_GROUP_ID, PRIORITY_TYPE_ID, PARTY_RELATIONSHIP_TYPE_ID,
PERMISSIONS_ENUM_ID, POSITION_TITLE, COMMENTS, LAST_UPDATED_STAMP,
LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table
'PARTY_RELATIONSHIP' caused a violation of foreign key constraint
'PARTY_REL_FPROLE' for key (DemoCustCompany,MANUFACTURER). The statement
has been rolled back.))]

There are no required fields on that part of the page - the only thing
that is odd is that the drop down box for status does not have any content?

Sorry if this is me being stupid!

Cheers
Sam

Reply via email to