You need to sign in to do that
Don't have an account?
jmck
Using "IF" and "ISBLANK" in Custom Button URL
Can you use logical functions in combination with a custom URL in a custom button? I would like for the formula to evaluate whether or not a field is blank and utilize one custom URL if it is and another if not. The URLs work by themselves, but fail when I try to combine them with the logical functions.
{!
IF(ISBLANK(Account.Parent),
"/001/e?acc3={!Account.Name}&CF00N40000002GuGT={!Account.Name}&
RecordType=01240000000M4W4&ent=Account",
"/001/e?acc3={!Account.Name}&CF00N40000002GuGT={!Account.Parent}&
RecordType=01240000000M4W4&ent=Account")
}
Then put in the following:
var loc;
if(
"{!Account.Parent}" == ""
){
loc = "/001/e?acc3={!Account.Name}&CF00N40000002GuGT={!Account.Name}&
RecordType=01240000000M4W4&ent=Account";
}
else{
loc = "/001/e?acc3={!Account.Name}&CF00N40000002GuGT={!Account.Parent}&
RecordType=01240000000M4W4&ent=Account";
}
window.top.location.href = loc;
I think this should work for you.