+ Start a Discussion
cmelliottcmelliott 

What is wrong with decimal I keep getting error

Hello All,


I am new at this, I am trying to customize so that I can calcucate a percentage of late fee based on days past due and bal of invoice.

I keep getting syntax errors.  Any suggestions?

 

 

 

IF(AND(forseva1__FInvoice__c.forseva1__Days_Past_Due__c >0,forseva1__FInvoice__c.Gross_Invoice_Total__c >= 2000), ROUND(forseva1__FInvoice__c.forseva1__Days_Past_Due__c *0 .00493) , 2)
((forseva1__FInvoice__c.forseva1__Days_Past_Due__c * 0.000164))

Best Answer chosen by Admin (Salesforce Developers) 
MellowRenMellowRen

It appears you have typed a left curly bracket instead of a comma and have an extra right curly bracket inside the Round statement. Formula should be:

 

IF(AND(forseva1__FInvoice__c.forseva1__Days_Past_Due__c >0,forseva1__FInvoice__c.Gross_Invoice_Total__c >= 2000), ROUND(forseva1__FInvoice__c.forseva1__Days_Past_Due__c *0 .00493 , 2)(forseva1__FInvoice__c.forseva1__Days_Past_Due__c * 0.000164))

 

Also there is no need for the last set of internal brackets, so it could be:

 

IF(AND(forseva1__FInvoice__c.forseva1__Days_Past_Due__c >0,forseva1__FInvoice__c.Gross_Invoice_Total__c >= 2000), ROUND(forseva1__FInvoice__c.forseva1__Days_Past_Due__c *0 .00493 , 2)forseva1__FInvoice__c.forseva1__Days_Past_Due__c * 0.000164)

 

That should do it, good luck.

All Answers

MellowRenMellowRen

It appears you have typed a left curly bracket instead of a comma and have an extra right curly bracket inside the Round statement. Formula should be:

 

IF(AND(forseva1__FInvoice__c.forseva1__Days_Past_Due__c >0,forseva1__FInvoice__c.Gross_Invoice_Total__c >= 2000), ROUND(forseva1__FInvoice__c.forseva1__Days_Past_Due__c *0 .00493 , 2)(forseva1__FInvoice__c.forseva1__Days_Past_Due__c * 0.000164))

 

Also there is no need for the last set of internal brackets, so it could be:

 

IF(AND(forseva1__FInvoice__c.forseva1__Days_Past_Due__c >0,forseva1__FInvoice__c.Gross_Invoice_Total__c >= 2000), ROUND(forseva1__FInvoice__c.forseva1__Days_Past_Due__c *0 .00493 , 2)forseva1__FInvoice__c.forseva1__Days_Past_Due__c * 0.000164)

 

That should do it, good luck.

This was selected as the best answer
cmelliottcmelliott

Thank you so much for your help.