Skip to main content
October 1, 2021
Question

How to navigate to Site page when we click on Button or card as button?

  • October 1, 2021
  • 5 replies
  • 0 views

Is there any possibility to navigating to Site page when we click on button or configured card as button?

Any insights or suggestions to achieve the same.

Our requirement is to navigate Record configured site page when we click on Link or button at interface.

Thanks in advance.

    5 replies

    October 1, 2021

    Hi Ramp,

    Yes, It's possible.

    Please try below sample code.


    a!cardLayout(
    contents: {
    a!richTextDisplayField(
    value: a!richTextItem(text: "Navigate to Site Record", color: "ACCENT", ),
    align: "CENTER"

    ),

    },
    showShadow: true(),
    shape: "SEMI_ROUNDED",
    padding: "LESS",
    link: a!safeLink(
    uri: "Site link here with constant",
    ),
    height: "AUTO",
    style: "ACCENT"
    ),

      Regards,

    Devi

    ramkumarpAuthor
    October 1, 2021

    We tried with safelink open with same tab. its loading the entire site instead of navigating to targeted page. Thanks for the reply.