Open Record Links In New Window

Hey everyone,

 

I have a requirement where the user would like to be able to navigate back from a record to the page that requested it.

How this is currently working is that I have a site, and on the main site home page, users can click on record links associated with tasks assigned to the user. Users can also perform a search using a form that I built and return back results which have record links in a table that the user can click on to view more details about the record selected.

I'm currently using a!recordLink, but I found something on the community to use a!safelink and pass in the urlforrecord function to the uri. This opened the link in a new window which fixed the issue (It's not a back button, but the customer was happy with this solution), but the problem I now have is that the record is displayed in Tempo and not embedded in the site link a!recordlink was. I am aware that I could alter the URL to not point at Tempo and instead look at my Site, but I am reluctant to do this in case Appian changes the URL structure.

I also thought to reuse the record rule as an interface with a back button, but then the user would not be able to have any of the record views/related actions displayed.

If anyone has some suggestions how to fix this solution (Either by making the record open in a site, or provide a means for a back button or similar) I would appreace it.

 

Thanks.

  • Hi Benjamins,

    I would go by your opinion of modifying the url to point to site instead of tempo and force the redirection.

    To keep it manageable in case the url structure is changed in the future - you may create a common rule that parses the link generated by recordLink and then gives you a link back that you can map to the safelink field.

    The rule can have recordType, id and site address as  parameters

    something  like

    ri!mySiteUrl&
    a!recordLink(
      recordType: ri!myRecordType,
      identifier: ri!identifier
    ).@attributes.@anyAttribute._recordRef & "/view/summary"


    siteurl is the url to your page in site.

  • In reply to manisht209:

    I agree with this suggestion - further, I suggest you create a wrapper function to handle the entire functionality for "site-based record safelink" and then if your worries about appian changing the URL structure come true, you will be able to edit one rule to either fix or (as a worst-case scenario) at least revert to a different type of link, in a way that would work for the different interfaces you were using it on.
  • In reply to Mike Schmitt:

    Thanks for the suggestions.
  • In reply to manisht209:

    Hi Manish,

    May I know the relevance of "@attributes" and "@anyattribute" in

     

    ri!mySiteUrl&

    a!recordLink(

     recordType: ri!myRecordType,

     identifier: ri!identifier

    ).@attributes.@anyAttribute._recordRef & "/view/summary"

 Discussion posts and replies are publicly visible