You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by pg...@apache.org on 2015/11/18 12:50:44 UTC
svn commit: r1714975 -
/ofbiz/branches/release14.12/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
Author: pgil
Date: Wed Nov 18 11:50:44 2015
New Revision: 1714975
URL: http://svn.apache.org/viewvc?rev=1714975&view=rev
Log:
OFBIZ-6703 Cannot create more than one lead in the SFA component by same user
Replace createPartyRole service call with ensurePartyRole, avoiding duplicate pk creation error.
Thanks Taher for reporting
Modified:
ofbiz/branches/release14.12/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
Modified: ofbiz/branches/release14.12/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml?rev=1714975&r1=1714974&r2=1714975&view=diff
==============================================================================
--- ofbiz/branches/release14.12/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml (original)
+++ ofbiz/branches/release14.12/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml Wed Nov 18 11:50:44 2015
@@ -38,17 +38,10 @@
</then>
</if>
<check-errors/>
- <set field="createPartyRoleCtx.partyId" from-field="userLogin.partyId"/>
- <set field="createPartyRoleCtx.roleTypeId" value="OWNER"/>
+ <set field="ensurePartyRoleCtx.partyId" from-field="userLogin.partyId"/>
+ <set field="ensurePartyRoleCtx.roleTypeId" value="OWNER"/>
- <!-- 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>
+ <call-service service-name="ensurePartyRole" in-map-name="ensurePartyRoleCtx"/>
<!-- PartyRole check end -->
<if>