Thanks, Nicolas and Aditya for pointing in the right direction :)

On Wed, May 3, 2017 at 10:43 AM, Aditya Sharma <
aditya.sha...@hotwaxsystems.com> wrote:

> Hi Prakhar,
>
> I think you can use methods of EntityUtil class here. There are many useful
> methods available there.
>
> <http://goog_1018801742>
> https://ci.apache.org/projects/ofbiz/site/javadocs/org/ofbiz/entity/util/
> EntityUtil.html
>
> For example, One way can be that
> 1. You get contactMechId of all the address associated with given partyId &
> with contactMechPurposeTypeId (Billing and Shipping location)
> 2. Filter them out according to its contactMechPurposeTypeId using
> filterByCondition() or filterByAnd() for the first list
> 3. FilterOutByCondition() to remove all those already in first list for the
> second one.
>
> It will avoid multiple entity hits and may serve the purpose.
>
> Though it is just an example, there may be some other possibility depending
> upon your exact scenario.
>
> Thanks & Regards,
> Aditya Sharma
> Enterprise Software Engineer
> HotWax Systems Pvt. Ltd.
> http://www.hotwaxsystems.com/
>
>       <https://www.linkedin.com/in/aditya-sharma-78291810a/>
>
> On Tue, May 2, 2017 at 12:29 PM, Nicolas Malin <nicolas.ma...@nereide.fr>
> wrote:
>
> > If you postalAddress creation respect the ContactMechPurpose partner, you
> > have only one address with two purposes *billing* and *shipping*.
> >
> > So the problem would don't exist.
> >
> > :) please check you postal address creation
> >
> > Nicolas
> >
> >
> >
> > Le 28/04/2017 à 15:30, Prakhar Kumar a écrit :
> >
> >> My requirement is to display billing and shipping addresses of the
> >> customer
> >> during checkout. But I want to avoid identical addresses from getting
> >> displayed. This can be simply achieved by putting some checks on the
> front
> >> end but it's not that elegant. So, Is there any way to do it more
> >> efficiently in Ofbiz?
> >>
> >>
> >
>



-- 
Thanks and Regards
Prakhar Kumar
Enterprise Software Engineer
HotWax Systems

Reply via email to