-4
if(advance__c !=null){
  amount__c + Tax_Amount__c;
}
else{
  (amount__c + Tax_Amount__c)-advance__c;
}
2
  • 1
    What exactly you are looking for? Commented Dec 15, 2016 at 12:35
  • Do you mean a formula field ? Commented Dec 15, 2016 at 12:36

2 Answers 2

1

It seems like you are looking for a formula field. Create a formula field of type number and use this formula

IF(ISNULL( advance__c ) , (amount__c + Tax_Amount__c)-advance__c, amount__c + Tax_Amount__c)

0

amount__c + Tax_Amount__c - NULLVALUE(advance__c, 0)

Not the answer you're looking for? Browse other questions tagged .