svn commit: r766237 - in /ofbiz/branches/release09.04/applications/marketing: script/org/ofbiz/sfa/lead/LeadServices.xml servicedef/services.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r766237 - in /ofbiz/branches/release09.04/applications/marketing: script/org/ofbiz/sfa/lead/LeadServices.xml servicedef/services.xml

jonesde
Author: jonesde
Date: Sat Apr 18 06:17:26 2009
New Revision: 766237

URL: http://svn.apache.org/viewvc?rev=766237&view=rev
Log:
Applied fix from trunk for revision: 766236

Modified:
    ofbiz/branches/release09.04/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
    ofbiz/branches/release09.04/applications/marketing/servicedef/services.xml

Modified: ofbiz/branches/release09.04/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml?rev=766237&r1=766236&r2=766237&view=diff
==============================================================================
--- ofbiz/branches/release09.04/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml (original)
+++ ofbiz/branches/release09.04/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml Sat Apr 18 06:17:26 2009
@@ -53,6 +53,36 @@
                     <result-to-result result-name="contactMechId" service-result-name="contactMechId"/>
                 </call-service>
             </if-not-empty>
+            <if-not-empty field="parameters.address1">
+                <call-map-processor in-map-name="parameters" out-map-name="postalAddressCtx">
+                    <simple-map-processor name="postalAddress">
+                        <process field="address1">
+                            <copy/>
+                        </process>
+                        <process field="address2">
+                            <copy/>
+                        </process>
+                        <process field="city">
+                            <copy/>
+                        </process>
+                        <process field="stateProvinceGeoId">
+                            <copy/>
+                        </process>
+                        <process field="countryGeoId">
+                            <copy/>
+                        </process>
+                        <process field="postalCode">
+                            <copy/>
+                        </process>
+                    </simple-map-processor>
+                </call-map-processor>
+                <check-errors/>
+                <set field="postalAddressCtx.partyId" from-field="partyId"/>
+                <set field="postalAddressCtx.contactMechPurposeTypeId" value="PRIMARY_LOCATION"/>
+                <call-service service-name="createPartyPostalAddress" in-map-name="postalAddressCtx">
+                    <result-to-field result-name="contactMechId" field="postalContactMechId"/>
+                </call-service>
+            </if-not-empty>
         </else>
         </if-compare>
 

Modified: ofbiz/branches/release09.04/applications/marketing/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/applications/marketing/servicedef/services.xml?rev=766237&r1=766236&r2=766237&view=diff
==============================================================================
--- ofbiz/branches/release09.04/applications/marketing/servicedef/services.xml (original)
+++ ofbiz/branches/release09.04/applications/marketing/servicedef/services.xml Sat Apr 18 06:17:26 2009
@@ -385,8 +385,7 @@
     </service>
 
     <!-- lead services -->
-    <service name="createLead" engine="simple"
-        location="component://marketing/script/org/ofbiz/sfa/lead/LeadServices.xml" invoke="createLead">
+    <service name="createLead" engine="simple" location="component://marketing/script/org/ofbiz/sfa/lead/LeadServices.xml" invoke="createLead">
         <description>Create a Lead Person or Group</description>
         <auto-attributes entity-name="Person" mode="IN" optional="true">
             <exclude field-name="partyId"/>
@@ -398,7 +397,7 @@
             <exclude field-name="contactMechId"/>
         </auto-attributes>
         <attribute name="partyId" type="String" mode="OUT"/>
-        <attribute name="contactMechId" type="String" mode="OUT" />
+        <attribute name="contactMechId" type="String" mode="OUT" optional="true"/>
         <attribute name="emailAddress" type="String" mode="IN" optional="true"/>
         <attribute name="groupName" type="String" mode="IN" optional="true"/>
         <attribute name="title" type="String" mode="IN" optional="true"/>