Author: taher
Date: Wed Oct 28 15:35:45 2015
New Revision: 1711040
URL: http://svn.apache.org/viewvc?rev=1711040&view=rev
Log:
backport fix from OFBIZ 6703 to release 12.04
this fixes the bug identified in above mentioned JIRA and allows multiple
lead creations in the SFA component
Modified:
ofbiz/branches/release12.04/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
Modified:
ofbiz/branches/release12.04/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml?rev=1711040&r1=1711039&r2=1711040&view=diff
==============================================================================
---
ofbiz/branches/release12.04/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
(original)
+++
ofbiz/branches/release12.04/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
Wed Oct 28 15:35:45 2015
@@ -40,7 +40,17 @@
<check-errors/>
<set field="createPartyRoleCtx.partyId"
from-field="userLogin.partyId"/>
<set field="createPartyRoleCtx.roleTypeId" value="OWNER"/>
- <call-service service-name="createPartyRole"
in-map-name="createPartyRoleCtx"/>
+
+ <!-- PartyRole check start - if the user does not have OWNER roleType
then add it -->
+ <entity-one entity-name="PartyRole" value-field="roleFound">
+ <field-map field-name="partyId"
from-field="createPartyRoleCtx.partyId"/>
+ <field-map field-name="roleTypeId"
from-field="createPartyRoleCtx.roleTypeId"/>
+ </entity-one>
+ <if-empty field="roleFound">
+ <call-service service-name="createPartyRole"
in-map-name="createPartyRoleCtx"/>
+ </if-empty>
+ <!-- PartyRole check end -->
+
<if>
<condition>
<and>