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
Sankar GaneshSankar Ganesh 

How to display URL based on condition in detail page link

I have detail page URL button in which I have to open two URL based on some criteria. I tried using If condition but I am getting servlet keyword in the URL. can anyone suggest me how to remove servlet and open the correct link.
below is the URL format I tried.
{!IF( Campaign.UI_Theme__c  = 'Theme4d', '/lightning/r/Report/00Oi0000006Cp9L/view?fv0={!Campaign.Name}', '/00Oi0000006Cp9L')}

In classic I am getting URL as /servlet/%2F00Oi0000006Cp9L

Can anyone help me to remove Servlet from URL. `