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
bujjibujji 

How to open window basing on the IF condtion in formula field

Hi Guys,

I want to redirec to a url basing on the IF codntion on clicking on the standard page. For this i am creating a custom button and i am exectuing javascript.

i.e., using this condtion {!IF(logical_test, value_if_true, value_if_false)}  ..how to redirec to a url

Thanks,
Bujji
Patrick Maxwell AppfolioPatrick Maxwell Appfolio
Hello Bujji,

This code for a Javascript button should get you started.  The links for this button goes to W3Schools which is a great place to learn about Javascript.

{!REQUIRESCRIPT('/soap/ajax/29.0/connection.js')}
var x = 4;
var y = 5;

function myFunction(){
if(x>y)
{
window.open("http://www.w3schools.com");
}

else{
window.open("http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_open");}
}
result = myFunction();