1

i have data on my contacts spread over different systems, among which civicrm. i do have keys of the external system in civicrm, e.g. an id 123. now, this key can be used to browse info on this contact at https://externalsystem.tld/users/123.

technically, just knowing the id 123 would be enough to then look up such further info, and might save our database some space over also storing the full URLs.

however, from a UX perspective, it would be nice if our people browsing the civicrm contacts would simply have a link or even button per contact, saving them the labor of manually constructing URLs to then manually open, if they wanted to look up a contact in the external system.

how might we give our contact UI buttons or URLs like this?

1 Answer 1

2

You can come oh-so-close with searchkit and formbuilder, but it only works if the logged-in user is viewing their own contact. It might be worth posting in https://chat.civicrm.org in the searchkit channel if there's a way to get the "currently viewed contact id" and use that in the WHERE clause.

If there were, then you can set up a search that outputs external_id, and uses the "currently viewed contact id" in the where clause, then add a search display and use the "rewrite" option for the external id field to make it the url and insert token [external_identifier].

Then create a formbuilder form for the display, and choose the option to "add to contact summary page".

You can also do it with custom code and hooks, but not sure if that's what you're looking for.

Here's a screenshot of what it looks like with "currently logged in user" in the where clause:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.