We are going to stop using tempo and have users work within sites. Some of our sites use record lists. When you are working a record you will get a conrimfarion screen with a link to the record list. We generate this with urlforrecord. However, this always uses the tempo URL and not the site. How do we direct to the site URL for the record?
I know we can construct the site URL from components of base, /site/, site-name, page-name, but is there no function that would give us a site specific URL?
Would be great if a!recordLink allowed for a null identifier which takes you to the record list. Also, would be awesome if there was another input for site where you could pass a site constant (which does not exist currently) and it would use that as the base context for display.
Discussion posts and replies are publicly visible
I agree, and it would also be nice if urlforrecord() provided functionality to manually set whether the URL generated would be tempo or for a site (and perhaps also needed, which site).
For now I think you should be safe manually constructing the URL as others have mentioned previously - for future-proofing, I would generate specialized expression rules to handle this, as opposed to hardcoding it on your forms, because in the future if either A) the site URL format is updated slightly, or B) official functionality becomes available, then all you would need to do then is update your expression rule(s).
Also note that I believe Appian's official response to this will be "but just use Record Links...", which works but is not acceptable in every scenario (i.e. inter-record links, links to records from tasks, etc).
I don't understand "but just use Record Links...". This goes to a record not a record list.
Jacob Edelman said:This goes to a record
that's what a!recordLink does... at least, that's the main use case.
Right and I'm saying we need to link to a record LIST that shows within a site. urlForRecord shows a record list within tempo.
Jacob Edelman said:Right and I'm saying we need to link to a record LIST
I believe a!recordLink also handles this (and goes to the correct site) if you leave out the record identifier ... the only issue I know of is that the link will take you away from the current form/task, which is not always desired.
edit: I was wrong, please disregard.
This is the code I'm testing:
a!linkField( links: { a!recordLink( label: "Record List Link", recordType: cons!RECORD_TYPE ) } )
This what I see as the url:
myUrl/suite/tempo/records/item//view/summary
yeah, i just tried it myself again, and it seems i was wrong
urlofrecord gives the correct linke but within tempo context.
So my suggestion from my initial reply still stands (constructing URLs manually in an expression rule) - also just to add, in one project I'm currently on, the previous developers got around this issue by using Reports instead of the OOB record lists, each one containing a custom grid and filtering/searching. Then you can just use report links to navigate around to different "record lists" (actually custom-configured reports) from a top-level interface (also a report) which would be the parent object on a Site tab, for instance.
If you have your record list configured as a page in the site, you could just provide a link to that page. You could also build a report that effectively replaces the record list and use a!reportLink() in the confirmation screen.
Now, given that you're using urlforrecord, I'm guessing you have a way of generating the record link dynamically. If that's the case, you could create some sort of mapping from record type to report so that you can generate that a!reportLink dynamically.