Record link from interface to record view

I have a grid displaying multiple items from a record in an interface and I added a record link to one of the columns.

Given the user press the record link, it should redirect the user to that item's summary view in the record. I am not sure what to use for record link's identifier and currently if i use the item's id as identifier, it gives me back "The record data does not exist, has been deleted, or you do not have sufficient privileges to access it.".

I believe that the record link identifier is incorrect but I don't know where I should find that individual record identifier. In documentation it says that it is the primary key of the CDT but it did not work for me.

Thank you in advance!

  Discussion posts and replies are publicly visible

  • +1
    Certified Senior Developer

    Hi ,

    1. You should be having a Rocord Type created with an column as link to redirect it to summary page.

    2. Create a constant of Record type and map the above created record in that.

    3. In Grid use links: and call the a!recordLink .

    Please find the example below:

    So in this my Record Type is mapped to constant call : cons!TS_RECORD_TYPE_REQ

    And that Record Type will be having this expression as one of the column to redirect it to summary page :

    a!recordLink(
    label: rf!requestId,
    recordType: rp!type,
    identifier: rp!id
    )

    Then use below code in grid:

    a!gridTextColumn(
    label: "Request Id",
    field: "requestId",
    data: index(
    local!datasubseta.data,
    "requestId",
    {}
    ),
    links: a!forEach(
    items: local!datasubseta.data,
    expression: a!recordLink(
    label: fv!item.requestId,
    recordType: cons!TS_RECORD_TYPE_REQ,
    identifier: fv!item.requestId
    )
    )
    )

    **Also check for the Record Type security It should not be restricted.**

    Hope this will work.

  • It definitely is the Primary key of the record in question. What are you using to generate the record link? It should be something like this:

    =a!recordLink(
      label: myCDT.businessMenaingfulRecordLabel,
      recordType: cons!MY_RECORD_TYPE,
      identifier: myCDT.primaryKeyField
    )

    ...

  • Thank you all for your quick replies. I spotted the mistake while comparing my code with the example. I was a missing variable (rookie mistake) Thank you very much for your help!