Hi All,
I Tried Writing a Client Script in V2.0
My Script :
/**
*@NApiVersion 2.x
*@NScriptType ClientScript
*/
define(['N/record'
, 'N/log'
],
function (nRecord, nLog) {
return {
helloWorld: function () {
var anyRecord = nRecord.load({
type: ’Type',
id: ID
});
//DO ANY OPERATION ON anyRecord
var recId = anyRecord.save();
nLog.error('recId', recId)
}
}
})
Issues that I am facing :
1. I want to Run the above Script in Script Debugger - But my Function helloWorld() is not getting invoked and I could not find if there is any Error or my Script is fine.
2. I am not able to upload the Script in Backend in V2.0 as Client Script - if I am uploading the script in Backend with Comments , it Is throwing error related to entry point and if I am uploading the script in Backend without Comments then it is considering my Script in V1.0
3. Error: SuiteScript 2.0 entry point scripts must implement one script type function.