Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
106
rated 0 times [  109] [ 3]  / answers: 1 / hits: 7766  / 10 Years ago, sat, february 15, 2014, 12:00:00

I am a newbie at NetSuite scripting. It looks like a normal EDIT or UPDATE function is not at all normal in the Netsuite. There are APIs for creating and deleting record like nlapiCreateRecord and nlapiDeleteRecord, but nowhere in the documentation I could find the way to edit and update the existing record. I have restrictions on using PHP.



I have created a custom TFC customer form (server side js), which should be able to fetch the data and update if required. I have been able to fetch the records as of now, but please tell me how to update an existing record?


More From » netsuite

 Answers
6

To be a little more precise, use nlapiLoadRecord to fetch the record from the database. Set the fields as needed. Use nlapiSubmitRecord to save it.



Untested code off the top of my head:



var record = nlapiLoadRecord('record_type_goes_here', internal_id_of_record_goes_here);
record.setFieldValue('field_internal_id_goes_here', 'value to set goes here);
nlapiSubmitRecord(record);


Fill in the appropriate values where needed.


[#47702] Friday, February 14, 2014, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
pierre

Total Points: 716
Total Questions: 128
Total Answers: 102

Location: Djibouti
Member since Sun, Feb 27, 2022
2 Years ago
;