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
Salesforce 283Salesforce 283 

Can you explain the formula field?

IF( Cancelled__c ,'Cancelled', 
 IF(Amount_Due__c = 0, 'Paid', 
  IF (OR((Amount_Due_Remaining__c <= 0),(Open_Balance__c + Amount_Due_Remaining__c) <= 0), 'Paid', 
    IF(Amount_Paid__c > 0,IF( Amount_Due_Remaining__c >0, 'Paid Partial','Paid'),'Open'))))
Best Answer chosen by Salesforce 283
sandeep sankhlasandeep sankhla
Hi,

this says..

if Cancelled__c  chcekbox is true than assign Cancelled else check if Amount_Due__c  ==0 then paid else chck if Amount_Due_Remaining__c <= 0 or Open_Balance__c + Amount_Due_Remaining__c) <= 0 then Paid else check if Amount_Paid__c >0 then check IF( Amount_Due_Remaining__c >0, then 'Paid Partial'else'Paid' else open


summary:
 
if(Cancelled__c checkbox is true)
{
	return 'Cancelled;
}
else
{ 
     if(if Amount_Due__c  ==0  )
	 {
	     return 'paid';
	 }
	 else
	 {
	     if(if Amount_Due_Remaining__c <= 0 || (Open_Balance__c + Amount_Due_Remaining__c) <= 0  )
		 {
			return 'Paid'
		 }
		 else
		 {
		    if(if Amount_Paid__c >0)
			{
			   if( Amount_Due_Remaining__c >0)
			   {
			     return 'Paid Partial';
			   }
			   else
			   {
			      return 'Paid';
			   }
			}
			else
			{
			   return 'Open';
			}
		 }
	 }
}

please check and let me knwo if it helps..

Thanks,
Sandeep

All Answers

sandeep sankhlasandeep sankhla
Hi,

this says..

if Cancelled__c  chcekbox is true than assign Cancelled else check if Amount_Due__c  ==0 then paid else chck if Amount_Due_Remaining__c <= 0 or Open_Balance__c + Amount_Due_Remaining__c) <= 0 then Paid else check if Amount_Paid__c >0 then check IF( Amount_Due_Remaining__c >0, then 'Paid Partial'else'Paid' else open


summary:
 
if(Cancelled__c checkbox is true)
{
	return 'Cancelled;
}
else
{ 
     if(if Amount_Due__c  ==0  )
	 {
	     return 'paid';
	 }
	 else
	 {
	     if(if Amount_Due_Remaining__c <= 0 || (Open_Balance__c + Amount_Due_Remaining__c) <= 0  )
		 {
			return 'Paid'
		 }
		 else
		 {
		    if(if Amount_Paid__c >0)
			{
			   if( Amount_Due_Remaining__c >0)
			   {
			     return 'Paid Partial';
			   }
			   else
			   {
			      return 'Paid';
			   }
			}
			else
			{
			   return 'Open';
			}
		 }
	 }
}

please check and let me knwo if it helps..

Thanks,
Sandeep
This was selected as the best answer
Salesforce 283Salesforce 283
Hi Sandeep, Thank u its working..