ExploreConsulting / netsuite-fasttrack-toolkit-ss2

NFT for SuiteScript 2.X
74 stars 20 forks source link

Dynamic mode no longer working on 5.6.0 #35

Closed nathaniel-norton closed 4 years ago

nathaniel-norton commented 4 years ago

When attempting to load a record in dynamic mode I receive an error saying that I've performed an invalid sublist operation.

    let opportunityRecord = new Opportunity(recordId, true)
    log.debug('opportunityRecord', opportunityRecord)

ERROR: SSS_INVALID_SUBLIST_OPERATION You have attempted an invalid sublist or line item operation. You are either trying to access a field on a non-existent line or you are trying to add or remove lines from a static sublist

This was working on 5.3.0. We recently updated a project to 5.6.0 and then this error showed up.

ShawnTalbert commented 4 years ago

5.6.0 did have changes to sublists behind the scenes (improvements?).

@nathaniel-norton can you please email me a link to the project/script in question so I can take a look?

ShawnTalbert commented 4 years ago

I've identified the problem and will patch it for 5.6.1. Turns out this is due to the behind the scenes 'new' feature of handling the phantom line that exists on dynamic record sublists.

ShawnTalbert commented 4 years ago

This should be addressed in 5.6.1, please confirm

nathaniel-norton commented 4 years ago

@ShawnTalbert The original issue appears to be resolved. However, when working in dynamic mode the addLine method doesn't work properly. It throws an error which says TypeError: Cannot set property "item" of undefined to "XX". I'll send you additional details via email.

ShawnTalbert commented 4 years ago

Thanks - I'll close this issue continuing on with #36 for addLine()