Hi Ashish,

yes, for sure that wasn't a bug. Here is another small improvment: make externalId of Party entity useable through createPerson service:

Index: applications/party/servicedef/services.xml
===================================================================
--- applications/party/servicedef/services.xml    (revision 665986)
+++ applications/party/servicedef/services.xml    (working copy)
@@ -76,6 +76,7 @@
<attribute name="statusId" type="String" mode="IN" optional="true"/> <attribute name="preferredCurrencyUomId" type="String" mode="IN" optional="true"/> <attribute name="description" type="String" mode="IN" optional="true"/> + <attribute name="externalId" type="String" mode="IN" optional="true"/>
        <override name="firstName" optional="false"/>
        <override name="lastName" optional="false"/>
    </service>
Index: applications/party/src/org/ofbiz/party/party/PartyServices.java
===================================================================
--- applications/party/src/org/ofbiz/party/party/PartyServices.java (revision 665986) +++ applications/party/src/org/ofbiz/party/party/PartyServices.java (working copy)
@@ -144,7 +144,7 @@
            if (statusId == null) {
                statusId = "PARTY_ENABLED";
            }
- Map newPartyMap = UtilMisc.toMap("partyId", partyId, "partyTypeId", "PERSON", "description", description, "createdDate", now, "lastModifiedDate", now, "statusId", statusId); + Map newPartyMap = UtilMisc.toMap("partyId", partyId, "partyTypeId", "PERSON", "description", description, "createdDate", now, "lastModifiedDate", now, "statusId", statusId, "externalId", context.get("externalId")); String preferredCurrencyUomId = (String) context.get("preferredCurrencyUomId");
            if (!UtilValidate.isEmpty(preferredCurrencyUomId)) {
newPartyMap.put("preferredCurrencyUomId", preferredCurrencyUomId);


And a new question :) [BTW: if you ever think RTFM is the right answer to my questions, that's fine, please give me a hint of the correct manual]

I'm trying to get behind the idea of CountryCode entity in combination with Geo entity... my problem: I have to create PostalAddress with ISO 2 letter Country Code, while PostalAddress requires a geoId. The question right now is: what unique information does CountryCode hold? why is it needed?
maybe Geo.geoCode is what I'm looking for?
Does a "fetch Geo where geoTypeId == 'COUNTRY' && Geo.geoSecCode is not null && Geo.geoCode == isoCodeWeAreLookingFor " return the correct result?

Thanks again and again,
Roland

Ashish Vijaywargiya wrote:
RolandH,

Thanks for your comments.
No need to create the JIRA issue for it.
I managed to update the code because it was of one line change.
Please take the update.

But we should note it down that it will be considered as "improvement"
instead of "BUG".

Reply via email to