Accessing related entities in javascript RRS feed

  • Question

  • I have a USER_FIELD_TEMPLATE entity which can contain 0 to many USER_FIELD_REPLACEMENTS entities

    So I'm loading these and want to iterate through the replacement values; There's 11 template records, and each one has varying numbers of replacement values.

    myapp.activeDataWorkspace.<database>.qGet_UserFieldTemplates().expand("USER_FIELD_REPLACEMENTS").execute().then(function (result) {

             var y = result.results[0];

    I grab the first one (y) which has 2 USER_FIELD_REPLACMENT records. Properties of template entity coming through no problem;



    When I access the related entity I can't seem to figure out how to access the properties;



        [prototype]: {...}

        _data: {...}

        _details: {...}



        [prototype]: {...}

        linkSet: {...}

        query: {...}

        state: 1

        value: {...}

    Anyone done this before?

    Thursday, February 2, 2017 1:28 AM


  • Searched before posting, but searched again on "Lightswitch .expand" and found the answer.


    Working great.. on to the next roadblock

    • Marked as answer by dcagamer Thursday, February 2, 2017 5:30 PM
    Thursday, February 2, 2017 5:30 PM