on ‎2019 Mar 28 4:56 PM
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.
Request clarification before answering.
Make your impex translator, which will use the impex line content for address identification
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 ; ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
| User | Count |
|---|---|
| 1 | |
| 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.