The function "ReplaceURLDomain" around the link being passed in prevents us from using a link that is externa to our Outsystems environment.
You can change the code around the link if needed. Would that not fix your issue?