Handling phone number click and Opening records

Hello,
I have SuiteCRM v8 running locally, and I’ve created a custom module inside it.

So when clicking on any phone number, Chrome show the message “Open Pick an App.”
I need to prevent this default behavior and capture the event in my module’s ts file (to detect that phone number x was clicked).

Also, from inside the module, how can I open any record using its type and ID without refreshing the page?
For example, open account: http://suitecrm.com/#/accounts/record/{id}

Maybe you have some extension installed in the browser.

I don’t know how you can open the record without refreshing the page.

What are you trying to achieve?

Hi rsp,

I don’t need to use any browser extensions. From my custom module, I need to add functionality to detect phone number clicks. There are already existing modules with this feature, so I believe it can be done without extensions.

Also, I have a record ID (contact or account) that I need to open. However, simply changing the URL refreshes the entire page, so I believe a different approach is required to handle this.

This depends on what you’re doing, where the flow of code is. But one common thing that could be helpful to you is to ask for a redirect when returning from a back-end process. So:

  1. Something in the UI (a button, for example) triggers a back-end process
  2. When returning, you can set a few arguments in the responseData, typically error messages or success messages.
  3. The front-end receives this and acts accordingly

Example here, at the bottom (search for “redirect”)