FAQ: How can I set mapping order to ensure particular fields are mapped first?
Q: When importing sales orders, I have some body-level fields that reset after other fields are populated. This causes an error that the mapping is missing. I’m trying to set my shipping address fields first because they change the form layout in NetSuite. I’ve tried putting those fields first in the mapping, and I’ve also tried setting the Use Dynamic Mode field to true.
Because the address fields are currently getting set after the body fields, it is losing the body fields. This is because the address fields are triggering the form layout update. This is resulting in duplicate orders being created. I’m exporting from Magento 2 to NetSuite. How can I fix this?
A:
- Make sure that in your Import field column (NetSuite), the Use Dynamic Mode field is selected and mapped to “true” in your corresponding Export field (Magento 2) column. Alternately, you can click the Settings gear icon, set Field mapping type to Hard-coded, then set Value to True.
- Hard-code the address fields you need to set first. You can either do this directly in the mapping, such as “-2” -> Ship To Address, or you can set it in the Settings panel. To do so, click the Settings gear icon next to the field mapping row, select the Field mapping type of Hard-coded. In Options, choose Use custom value. Set the default value to -2, then Save. Don’t add quotes for this value, as quotes will already automatically be added to your value in your mapping.
- In the Import column, select the Use Address Sub record field, then in your corresponding Export column, enter: “false”.
0
Comments
To add here, if you are using a newer NetSuite import step that uses SuiteApp 2.0, and you are getting the error of "Failed to create, update/transform record because Cannot find function getSelectOptions in object Field", you need to map in this "use dynamic mode" and reorder to field mappings to align with how you would enter that same data into the NetSuite UI.
Please sign in to leave a comment.