Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
Script to sum amount in 3 custom entity fields
Would anyone have a working script to sum
cost1, cost2 into a Totalcost field in custom record in Netsuite?
Cost is currency and they are all custom fields in custom record.
I tried this and the sum doesn't work. It is returning whatever my FlightCost is
// Function to sum cost
function sumToTotalCost(){{
var FlightCost = nlapiGetFieldValue('custrecord_flightcost');
var HotelCost = nlapiGetFieldValue('custrecord_hotelcost');
var TotalCost = (parseFloat(FlightCost)) + (parseFloat(HotelCost));
nlapiSetFieldValue('custrecord_totalcost', TotalCost);
return true;
}}