Message Boards

Creating address object

David Gitonga, modified 10 Years ago.

Creating address object

Junior Member Posts: 63 Join Date: 7/26/13 Recent Posts
Hi guys Have just run into deadlock for now

I want to add Address to user through code.
This is what have done
Address adrs = AddressLocalServiceUtil.createAddress(addressId);

There are fields am not sure how to set them, this is the list of fields
adrs.setClassNameId
adrs.setClassPK
adrs.setCountryId
adrs.setTypeId


Where do i get those value, Any Idea

Thank you.
David Gitonga, modified 10 Years ago.

RE: Creating address object

Junior Member Posts: 63 Join Date: 7/26/13 Recent Posts
Have found out that classPk is ContactId user.getContactId(), and countryId CountryServiceUtil.getCountryByName(String name)

so am remaining with

adrs.setClassNameId
adrs.setTypeId