Discussions

Check out Oracle NetSuite upcoming events and conferences here
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Update your Profile with your Support type to get your Support Type badge.
Expand your NetSuite knowledge by joining our Ask A Guru Live sessions. RSVP on this event now.
Community Poll: What sort of content would you like to see more of?
Get ready to take on exciting new challenges and become the next SuiteMaster of the Month!

How to resolve the User Event Script error in line 144

edited Dec 5, 2022 4:28PM in Ask A Guru 3 comments

Hello,

The following is a User Event Script used to Create An Inventory Item upon button push from a Custom Record Form



/**

 *@NApiVersion 2.x

 *@NScriptType ClientScript

 */

  define(["N/ui/dialog", "N/ui/message", "N/search", "N/record", "N/currentRecord"], runScript);


 function runScript(dialog, message, search, record, currentRecord){

      // /**

   // * @param {ClientScriptContext.saveRecord} context

   // */

   return{

       saveRecord: function (context){

           var title = 'saveRecord() :: ';

      try {

          var currentRecord = context.currentRecord;

        var ReqRec = currentRecord.id;

        log.debug({

          title: "Rec Id",

          details: ReqRec

        });

        console.log(ReqRec);


        var TrfLinesRec = {};


        var subsidiary = currentRecord.getValue("custrecord_itbs_cps_subsidary__");

        var reqtranid = currentRecord.getValue("custrecord122");

        if (reqtranid) {

          var transRec = record.load({

            type: "customrecord_cps_contrat_de_vente_a_reme",// contrat de vente id

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!

Leaderboard

Community Whiz

Quarter 3 (Jul-Sep 2024)

This Week's Leaders

This Month's Leaders

All Time Leaders