function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BdoggBdogg 

Trying to Create Hyperlink

I am trying to create a hyperlink with several different fields populating to build it. 

For Example:
HYPERLINK(http://cp.fonality.com/call.cgi?Server_id=12345&extension=$User.Extension&username=johndoe&password=12345&number="&Phone, Call)

 

Both User Extension and Phone are fields set in Salesforce. 

The Bold text indicates the two fields we want to use for the hyperlink.  

Thanks for any advice

Best Answer chosen by Admin (Salesforce Developers) 
TheIntegratorTheIntegrator

that's easy, you can use the SUBSTITUTE function, something like this

 

SUBSTITUTE(SUBSTITUTE(SUBSTITUTE($User.MobilePhone, '(', ''),')','') ,' ','')

All Answers

TheIntegratorTheIntegrator

try

 

HYPERLINK('http://cp.fonality.com/call.cgi?Server_id=12345&extension='+$User.Extension+'&username=johndoe&password=12345&number=&Phone', 'Call')

 

 

I am not sure what's your phone field as in the URL you provided, Phone is just a parameter, so I have skipped it. You can follow the same way as User.Extension to add more salesforce values to the URL.

BdoggBdogg

Thanks that almost did the trick, the only other issue I am having is the Phone number is by default in SF as (###) ###-####  when using the link command I can't have any spaces, any suggestions on how to get that to just be the 10 digits without the space and parentheses?

TheIntegratorTheIntegrator

that's easy, you can use the SUBSTITUTE function, something like this

 

SUBSTITUTE(SUBSTITUTE(SUBSTITUTE($User.MobilePhone, '(', ''),')','') ,' ','')

This was selected as the best answer
BdoggBdogg

Awesome, thanks for the help!