How to resolve splitting of field data in to two columns when we try to push data to single column in CSV file using Suitescript ?

Scenario :

If we use comma as separator when creating CSV file through suite script, Suppose field data contains comma, when we try to push data to a single column in CSV that data will be break at comma and pushed to 2 columns. How to resolve this issue ?

Solution :

When we get data from the field, replace comma with space

Example:

var itemDescription = objRecord.getValue({ fieldId: “description” });

var itemDescription_Without_comma = itemDescription.replace(/,/g, ” “);

Leave a comment

Your email address will not be published. Required fields are marked *