This topic contains 1 reply, has 2 voices, and was last updated by Adolfo Garza 5 years, 10 months ago.

  • Author
    Posts
  • #26091

    rian luthfi
    Member
    @rian_luthfi

    Hello there,
    May I ask, i want to read all value on one sublist, for example on Customer Payment Transaction, on the bottom there is sublist ‘apply’ there, and on that sublist apply there is information about invoice that want to pay. what i want to know, how to read row sublist on netsuite with SS.02 ?
    Thanks before

  • #26092

    Adolfo Garza
    Member
    @adolfo_garza

    Using Serverside Suitescript 2.0 you gotta load the apply sublist and get items withย apply:”T” like:

    var CPRecord=RECORDMODULE.load({type: RECORDMODULE.Type.CUSTOMER_PAYMENT, id: 3382, isDynamic: false,});
    var lineCount = CPRecord.getLineCount(“apply”);

    for (var i = 0; i < lineCount; i++) {
    var isApplied = CPRecord.getSublistValue({ sublistId: ‘apply’, fieldId: ‘apply’, line: i });
    if(isApplied){
    log.debug(‘Applied found!’, CPRecord.getSublistValue({ sublistId: ‘apply’, fieldId: ‘internalid’, line: i }));
    }
    }

     

    https://pastebin.com/FzXiNeeP

You must be logged in to reply to this topic.