Forums › Cached › CSV Import
This topic contains 5 replies, has 0 voices, and was last updated by srussell 6 years, 7 months ago.
-
AuthorPosts
-
January 19, 2017 at 1:27 pm #23957
bsullivanHow can I set the External ID field to NULL? The CSV import doesn't let me do this. Even when I import in blank fields into the External ID field it doesn't work.
This is a cached copy. Click here to see the original post. -
June 13, 2017 at 11:00 pm #23958
greg.hillHi bsullivan,
Not sure if you have figured out the solution for this but if not, there is an option to set a default value for any NetSuite fields in Step #4 – Field Mapping of the CSV file import process – including setting fields to NULL. When in the Field Mapping step of the CSV import process, select the 'Externalid' field from the NetSuite Fields on the right side. It will add this field to the middle section of the UI where you would then typically select the fields from your CSV file to map. However, don't select a field from the 'Your Fields' section – instead, click on the little pencil icon to the left of the section showing the mapping and on the row just added for 'Externalid'. You will then be presented with an option to either "Provide Default Value" or "Set Value to Null". Obviously, you would select the "Set Value to Null" option. Continue to map your other fields and run your import and you should null out the external ID values as required.
Thanks,
Greg
-
November 10, 2017 at 8:22 am #23959
mmeyerYou can't seem to import a null value to this field, see screenshot… Netsuite, any workarounds for us? I need to be able to clear the external ID on a couple thousand inactive items…
-
November 10, 2017 at 9:39 am #23960
mwhite@hgyp.comThis is actually a pain. The only way I know to do it is with a script. I'd use a custom workflow action.
-
November 10, 2017 at 4:42 pm #23961
pcutlerWith SuiteScript you can load a record, set the external ID, and submit it. Depending on your use case, you could do this in a user event script, mass update script, scheduled script, etc.
The code would be:
Code:
var recordId = '123';
var recordType = 'customrecord1';
var record = nlapiLoadRecord(recordType, recordId);
record.setFieldValue('externalid', '');
nlapiSubmitRecord(record); -
March 28, 2018 at 3:04 pm #23962
srussellpcutler I'm trying to set or update externalid using SuiteScript 2.0. I'm creating a unique string from fields in the record and setting that to newExternalId. The first line below works fine, it sets the desired string into a notes field, but the second line that should set it into the externalid does not.
record.setValue('custrecord_notes', newExternalId);
record.setValue('externalid', newExternalId);
Do you know what the problem is here?
Edit: Figured it out. I needed to load the record with the N/record module and save it that way instead of saving it on the context object.
-
AuthorPosts
You must be logged in to reply to this topic.