You need to sign in to do that
Don't have an account?
pavan kumar 1864
formula field on opportunity custom field name Partner_involved__c
I have a formula field name Partner_involved__c on opportunity object, it should be marked 'true' when amount field in opportunity object is not blank, so i have written a formula-
IF(ISBLANK(Amount),"True","False")
but here irrespective of the amount field whether it is blank or not ,
The Formula field named Partner_involved__c is marking as 'False'.
Can anyone please explain how i can overcome this.
IF(ISBLANK(Amount),"True","False")
but here irrespective of the amount field whether it is blank or not ,
The Formula field named Partner_involved__c is marking as 'False'.
Can anyone please explain how i can overcome this.
Formula
IF(NOT(ISBLANK( Amount )),'True','False')
Apex Code
if(acc.Amount == 'True'){
system.debug('Hello');
}
All Answers
Try Below Formula Please Mark It As Best Answer If It Helps Thank You!
I got a Error
Error: Formula result is data type (Boolean), incompatible with expected data type (Text).
It's Working In My Org
Just Copy Paste Below Code Please Mark It As Best Answer If It Helps Thank You!
Should Be
IF(NOT(ISBLANK( Amount)),True,False)
Should Not Be
IF(NOT(ISBLANK( Amount)),"True","False")
Please Mark It As Best Answer If It Helps Thank You!
I wanted the formula field to return 'True' so that i can use it in if condition like
if(Partner_involved__c == 'true')
{
Logic.............
}
if(Partner_involved__c == true)
{
Logic.............
}
IF(NOT(ISBLANK( Amount)),True,False)
And
if(Partner_involved__c == true)
{
Logic.............
}
See Brother,Dont know why
Formula
IF(NOT(ISBLANK( Amount )),'True','False')
Apex Code
if(acc.Amount == 'True'){
system.debug('Hello');
}
Pavan you need to make sure you do the following
a) Please take away the inverted commas around the words True & False
b) Go to the Object Manager and Opportunity Object and in the fields select your formula field and click edit and scroll all the way to the bottom and in the Blank Fields Handling Section select the Radio Button that says Treat Blank Fields as blanks then your formula works as you want.