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
CushtyCushty 

custom java button, 'is field null' syntax

Hi,

I am struggling to combine two validation rules on a custom java button in salesforce.  I want the validation to check if a picklist value equals "procurement"and also that a number field is blank/null, if so display a message.  Below is what I have which doesn't do aything because I do not know how to check for a null/blank value (it works if I stated the number field equals a specific number, just doesn't work if equals null).

if({!ISPICKVAL(Opportunity.Contract_Type__c, "Procurement") && Opportunity.Final_Price_Number__c == null}) {
     alert('You need to enter the Final Price.............

Anyone can help, thanks..
Best Answer chosen by Cushty
Andrew EchevarriaAndrew Echevarria
try ISBLANK(Opportunity.Final_Price_Number__c)

All Answers

Ishwar ShindeIshwar Shinde
Are planning to put this check in apex or javascript?
Andrew EchevarriaAndrew Echevarria
try ISBLANK(Opportunity.Final_Price_Number__c)
This was selected as the best answer
CushtyCushty
Thanks.
It literally was as simple as that.....
reminder not to over think too much...