How to add link in readOnly grid.

Hello everyone.

I want to provide link in which users can go on click of link to particular page.

i.e  I have a readOnly grid with column such as xyz,now I need to provide provide link for that row ,where on click of that users needs to stay on the module page in new tab that they have clicked through the link. How can I achieve this ,Can anyone suggest me which linkfield that I have use?

the grid column is here

  Discussion posts and replies are publicly visible

Parents
  • I have used safelink for the same in readOnly grid.

     

    But Bcoz I have used uri:" ",getting page for all the modules as same page,Do I have any option to provide the different urls for each modules(business,financial,account....etc shown in the fig).Since url not same for all modules here

  • 0
    Certified Lead Developer
    in reply to JS0001

    What you have here will work, though I strongly suggest (in basically all cases) that developers avoid using a!linkField() and instead use a!richTextDisplayField(), subsequently making use of the "link" functionality contained down in a!richTextItem().  This approach is useful and more flexible in several ways - first, the link itself can conditionally be turned on or off depending on any factors you want (whereas a!linkField() will break if you try to not give it a link to refer to).  Secondly, you have full control over text formatting, icons, etc, as well as the link style itself (i.e. underlined or not).

    a!gridColumn(
      label: "Link Column",
      value: a!richTextDisplayField(
        value: {
          a!richTextItem(
            text: fv!row.workflowDescription,
            link: a!safeLink(
              showWhen: local!showWebLinks,
              uri: "www.google.com"
            ),
            
            /* further style configuration options, for reference: */
            linkStyle: "STANDALONE",
            size: "MEDIUM",
            style: "EMPHASIS"
          )
        }
      ),
      width: "AUTO"
    )

Reply
  • 0
    Certified Lead Developer
    in reply to JS0001

    What you have here will work, though I strongly suggest (in basically all cases) that developers avoid using a!linkField() and instead use a!richTextDisplayField(), subsequently making use of the "link" functionality contained down in a!richTextItem().  This approach is useful and more flexible in several ways - first, the link itself can conditionally be turned on or off depending on any factors you want (whereas a!linkField() will break if you try to not give it a link to refer to).  Secondly, you have full control over text formatting, icons, etc, as well as the link style itself (i.e. underlined or not).

    a!gridColumn(
      label: "Link Column",
      value: a!richTextDisplayField(
        value: {
          a!richTextItem(
            text: fv!row.workflowDescription,
            link: a!safeLink(
              showWhen: local!showWebLinks,
              uri: "www.google.com"
            ),
            
            /* further style configuration options, for reference: */
            linkStyle: "STANDALONE",
            size: "MEDIUM",
            style: "EMPHASIS"
          )
        }
      ),
      width: "AUTO"
    )

Children