This topic contains 0 replies, has 1 voice, and was last updated by learn suitescript 5 years, 6 months ago.

  • Author
    Posts
  • #26107

    learn suitescript
    Member
    @learn_suitescript

    I am required to write some code that disables a transaction column e.g. ‘quantity’ on a sublist e.g. ‘item’ on say a purchase order

    I seem to have reached a block as my code is not working (battling 2 days now). Please note I am new to coding in NetSuite so I suspect I am missing something really obvious.

    I would appreciate very much any help offered.

    See my code below:

    /**
    * @NApiVersion 2.0
    * @NScriptType ClientScript
    * @NModuleScope SameAccount
    */
    define([‘N/record’],
    /**
    * @param {record} record
    */
    function(record) {
    function sublistChanged(scriptContext) {
    var currentForm = scriptContext.currentRecord;

    var getSublist = currentForm.getSublist({
    sublistId: ‘item’
    fieldId: ‘quantity’
    });
    getSublist.isDisabled = true;
    }

    return {
    sublistChanged: sublistChanged,

    };

    });

You must be logged in to reply to this topic.