cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Referencing existing Address in ImpEx.

Former Member
0 Likes
2,048

I am creating an ImpEx for PaymentInfo and it has a billingAddress field of type Address. But the AddressModel does not have a "code" field for me to reference it in the ImpEx (like billingAddress(code)).

How should I do it?

INSERT_UPDATE PaymentInfo; code[unique = true]; billingAddress(WHAT_HERE?)

Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Likes

Make your impex translator, which will use the impex line content for address identification

arvind-kumar_avinash
Active Contributor
0 Likes

You can do it using Document ID. More information at https://wiki.hybris.com/display/release5/ImpEx+Syntax#ImpExSyntax-DocumentID

I have mentioned the following example from the link that I have shared above:

 INSERT Address; &addrID ; owner( Customer.uid ); ...
 ; addr1 ; andi ; ...
 
 INSERT Customer; uid[unique=true]; ...; defaultPaymentAddress( &addrID ); ...
 ; andi; ...; addr1 ; ...
Former Member
0 Likes

Thanks for the response Arvind.

In my case, the addresses already exists in the database. Also, in our initial data ImpExes, we would like to keep the addresses separated in a different and independent ImpEx file.

I don't know very much about the "&addrID" but it looks like it works as reference only for the same ImpEx file, is it correct?