I found I had hard coded the ID.
I did not realize it changed every time it was updated, so I figured since I
was not exposing facility and had the number in seed I could use it.
I changed it to.
           facilityId = "WebStoreWarehouse";
           List<Map&lt;String,Object>> valueMaps =        
ContactMechWorker.getFacilityContactMechValueMaps(delegator, facilityId,
false, null);
           for (Map<String, Object> thisMap: valueMaps) {
                GenericValue contactMech = (GenericValue)
thisMap.get("contactMech");
                shippingContactMechId =
contactMech.getString("contactMechId");
           }
Not sure if this is the easiest way, I put this together looking at the
screen and mixing groovy code ideas but using java in the end. 
I might go fix my edit address screens since I now can get the mechid, but I
would have to lookup how to do it for the company mechid as well since I did
two seperate edit screens, one for facility I called shipping address and
one for company I called company address.



-----
Joel Fradkin
--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/shipping-address-on-P-O-uses-first-not-current-tp4656407p4656420.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Reply via email to