Hi Experts,
There is a requirement to get the current web client URL to perform LaunchBrowser operation in client script.
Var link = “Current URL ’?task.task_id=” +taskID;
var taskID = getControlValue('task' ,'task_id' );
if (taskID!='' && taskID!=null )
{
var link="Current URL?task.task_id=" +taskID;
launchBrowser(link);
}
else
{
alert(getMessage('Error in Opening Tab' ,'Information' ));
}
Is there a way to achieve this using existing client script functions?
Thanks,
Hasara
Best answer by Shneor Cheshin
@Hasara Dinu
Does <CURRENT URL> changes?
As far as I know the URL is static. e.g. https://clientname-fsm-prod.ifs.cloud/WebClient
If that is the case, you can hard code the beginning of the URL and concatenate the task id that will be dynamically updated.
That was my solution for the same requirements I got.
var taskID = getControlValue('task' ,'task_id' );
var url = "https://clientname-fsm-prod.ifs.cloud/WebClient/tab/screen/TASK?task.task_id=" + taskID
if (taskID!='' && taskID!=null )
{
launchBrowser(url);
}
else
{
alert(getMessage('Error in Opening Tab' ,'Information' ));
}
https://community.ifs.com/ifs-field-service-management-fsm-employees-partners-only-103/generate-a-direct-url-to-a-request-13279
View original