on 08-17-2016 7:46 AM
Hi All,
I have requirement of setting the Address node(Address.Root) in customer through code for some specific scenario. I am facing the below error while creating address node :
<Note>Node Address.ROOT cannot be created separetely without node ADDRESS_INFORMATION.</Note>
Can you please let me know if i am missing anything.
Thanks,
Malkit Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Malkit,
Through code you can do something like it to create one address:
customer = this;
...
var addressInformation = customer.AddressInformation.Create();
var address = addressInformation.Address;
if (!address.IsSet())
address = addressInformation.Address.Create();
var addressRepresentation = address.DefaultPostalAddressRepresentation;
if (!addressRepresentation.IsSet())
addressRepresentation = address.DefaultPostalAddressRepresentation.Create();
addressRepresentation.CityName = "city"
addressRepresentation.CountryCode = "BR";
addressRepresentation.DistrictName = "district";
addressRepresentation.HouseID = "number";
...
A customer can have multiple addresses but just one is the default address, if you need it, you can identify it using the flag:
customer > AddressInformation > AddressCurrentAddressDeterminationProcesses > DefaultAddressDeterminationProcessRelevanceIndicator
Regards,
Alexandre.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.