SS1: Support arbitrary sublist names.#16
Open
paulclarkaranz wants to merge 4 commits into3EN-Cloud:masterfrom
Open
SS1: Support arbitrary sublist names.#16paulclarkaranz wants to merge 4 commits into3EN-Cloud:masterfrom
paulclarkaranz wants to merge 4 commits into3EN-Cloud:masterfrom
Conversation
2be1cf6 to
338db3f
Compare
Adds support for using record sublists other than `item` and `addressbook`. This shouldn't require any changes in dependant pieces of code unless they were relying on matching an error message or on `selectNewLineItem` erroring on unsupported records (it also "upserts" in the SS2 module). Most places that would have previously complained about unsupported lines will now complain about `TypeError: Cannot * property '*' of undefined`. Exceptions are: * `selectNewLineItem`: Will create new sublist groups and new currentLine groups as appropriate in line with what `selectNewLine` does in the SS2 module. (I'm not sure what that `addressbookaddress` thing is for but left it in for compatibility.) * `getLineItemCount` it was already returning 0 for unknown sublists so I left it that way I have left `lineItems` and `addressBookLines` as aliases in case they are being used in existing tests somehow (I don't think that is possible given the scope though). `lineItems` is still used in `transform()`, I am not sure if that should be updated and if so what to.
Similar to in 3EN-Cloud#12, add `setCurrentLineItemText` to set line item list fields by display string. And the same caveat applies, getting the value later won't return the index like it would in NetSuite.
96edce6 to
b9d2e26
Compare
In NetSuite this returns the display string for select fields. Here it returns the value, like everything else.
Previously the search `nlobjSearchFilter.matchesRecord()` was always returning undefined so `nlapiSearchRecord` should never have been matching anything.
f376e92 to
d44cfd4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for using record sublists other than
itemandaddressbook. This shouldn't require any changes in dependant pieces ofcode unless they were relying on matching an error message or on
selectNewLineItemerroring on unsupported records (it also "upserts" in the SS2 module).Most places that would have previously complained about unsupported lines will now complain about
TypeError: Cannot * property '*' of undefined. Exceptions are:selectNewLineItem: will create new sublist groups and new currentLine groups as appropriate in line with whatselectNewLinedoes in the SS2 module. (I'm not sure what thataddressbookaddressthing is for but left it in for compatibility.)getLineItemCountit was already returning 0 for unknown sublists so I left it that wayI have left
lineItemsandaddressBookLinesas aliases in case they are being used in existing tests somehow (I don't think that is possible given the scope though).lineItemsis still used intransform(), I am not sure if that should be updated and if so what to.Edit: also fixed bug in the SS1 search API.