Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DSRequest Pretty Print

    I am creating a log-utility for update, add and remove operations, and I would like to have something like the output I see on the debug window for a DSRequest:

    Request #1 (DSRequest) payload: {
    criteria:{
    },
    operationConfig:{
    dataSource:"dokumente",
    operationType:"fetch",
    textMatchStyle:"substring"
    },
    startRow:0,
    endRow:75,
    sortBy:[
    "f_dokument"
    ],
    componentId:"isc_ListGrid_4",
    appID:"builtinApplication",
    operation:"dokumente_fetch",
    oldValues:{
    }
    }


    How to get this "pretty print" from the DSRequest object?
    I am going to use it for update, add, remove operations. But that is not important I think if there is some dsRequest.prettyPrint() method or something like that. What would you recommend me?

    #2
    Look at DataTools.prettyPrint. To exactly match the output you're looking at you'll need to call several APIs on the server-side DSRequest object and put it all in a Map, then call prettyPrint.

    Comment

    Working...
    X