This topic contains 4 replies, has 0 voices, and was last updated by ironside 8 years, 1 month ago.

  • Author
    Posts
  • #1759

    JacksonP

    I’ve looked through the documentation and I can’t seem to find anything to get a whole sublist object with all of its layers. There is record.getSublist(options) but that seems to just return the specified Sublist’s properties. For example:

    Code:
    var addressbook = rec.getSublist({
    sublistId: ‘addressbook’
    });
    This will return:

    Code:
    addressbook =
    id: addressbook
    type: inlineeditor
    isChanged: false
    isDisplay: true
    But I want it to return the above as well as its lines in the whole sublist.

    Code:
    addressbook{

    currentline{
    example
    example2
    }
    line 1 {
    example
    example2
    }
    }
    I’ve found a messy work around to JSON.stringify(rec)

    and then JSON.parse(rec) to get it, but nothing else.
    This is a cached copy. Click here to see the original post.

  • #1760

    david.smith

    It’s not going to give you current line. You might be able to loop the lines to print out the values you seek.

    Code:
    var lineNum = objRecord.selectLine({
    sublistId: ‘item’,
    line: 3
    });


    JacksonP replied on 10/06/2016, 09:25 AM: I’m already keeping track of your new Chrome plugins David, Thanks. They’ve been a great help, saved search especially have never been more simple.

  • #1761

    ironside

    NFT-SS2 makes sublist traversal a native javascript experience.

  • #1762

    chanarbon

    Hi @JacksonP,

    Depending on what your approach be but the better options are

    a. On Dynamic mode, you can iterate on each line using rec.selectLine() and perform the the getting using rec.getCurrentSublistValue() and setting using rec.setCurrentSublistValue()

    b. on DeferredDynamic mode, you can iterate the getting by rec.getSublistValue() and setting by rec.setSublistValue()

  • #1763

    ironside

    Originally posted by JacksonP

    View Post

    I didn’t even know the hyperlink piece existed, that’s pretty awesome.

    We used to write links and colors and such directly into the NS execution log — until NS disabled that feature a while back.


    david.smith replied on 10/10/2016, 03:19 PM: Yah, that’s why I wrote this extension in the first place because they took away the html. I would color code and hyperlink in my execution logs all the time. Now it’s nice because I have "short cuts" that will do the same.

You must be logged in to reply to this topic.