On 18/12/2009, at 12:15 PM, David E Jones wrote:
Basically it means that the from party is not in the role that you've specified.The original idea with party roles in OFBiz was to not accidentally add parties to roles when a party in a role is referred to somewhere.I've thought a few times that maybe it's not the best idea to do so, and instead whenever a party is implied to be in a role if they are not already then they should be added automatically.
If we did that (which I'm in favor of), what purpose would the PartyRole entity continue to serve?
Regards Scott
-David On Dec 17, 2009, at 1:05 PM, Sam Hamilton wrote:Hi Guys,I was trying to work out how to create a relationship between a user anda 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-1712: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-1712: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 INTOOFBIZ.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 statementhas 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
smime.p7s
Description: S/MIME cryptographic signature
