'Is is possible to get the sublist data by manipulating DOM, if the sublist is not exposed to script? (NetSuite)

In Vendor Payment, there is a sublist CREDIT APPLIED, which is not exposed to script(according to NS support).

Is it possible to fetch that list through DOM Manipulation? enter image description here



Solution 1:[1]

You can but it's a bit of a pain.

If you have the skills to go that route you are better off (IMO) doing something like getting the xml version of your transaction and parsing that.

You get the xml version by adding a xml=T query parameter.

from a chunk of old code it would look like this in SS1.0

jQuery.get(window.location.href +'&xml=T').done(function(data, status, xhr){
            console.log("received tran with status: " + status);
            var txt = xhr.responseText;
            var doc = ('string' == typeof data) ? nlapiStringToXML(data) : data;
            var applied = nlapiSelectNode(doc, '/nsResponse/record/machine[@name="links"]');
            console.log(nlapiSelectValue(applied, 'line/id'));
    });

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 bknights