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
salmanmanekiasalmanmanekia 

A Formula question: How to check if the record is new

Hi,

 

I have to calculate the agreement value for my new record .Assuming that agreement value is ending_days - begining_days. I have put this formula in my object.

IF(Beginning__c <> Ending__c,Ending__c-Beginning__c,0).

 

I have two questions related to this

 

1: What is the agreement value ?, Am i correct in assuming what i have assumed or does it some specific other meaning?

2: I have to create an agreement value for new records only. So, should i take care of this fact in my IF condition For example : should my IF code look something like this

IF (AND(//somehow check if the record is new,Beginning__c <> Ending__c),Ending__c-Beginning__c,0)

Best Answer chosen by Admin (Salesforce Developers) 
goabhigogoabhigo

I am not sure about Agreement Value definition.

 

But to check whether a record is new, you can use Created Date = Last Modified Date. Though readymade ISNEW() function is available, but its not accessible in formula, validation rules etc.

All Answers

goabhigogoabhigo

I am not sure about Agreement Value definition.

 

But to check whether a record is new, you can use Created Date = Last Modified Date. Though readymade ISNEW() function is available, but its not accessible in formula, validation rules etc.

This was selected as the best answer
salmanmanekiasalmanmanekia

Thanks abhi..

Gombos_PeterGombos_Peter
Abhi is right, this is really the only way I found to distinguish NEW() state. Additionally, maybe someone else is going to have the same trouble with ISCHANGED function in Process Builder. Nowadays, it is not to be found in the Formula Builder, but you can find it in the manual filter setup:

User-added image

Yes, it is in German :) May help someone so he/she does not need to spend 2 hours of wild search for this feature like myself :)