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
gizmo100gizmo100 

Field update to work only if the object record type is equals to A

Hello,

 

I have this formula (thanks Stevemo!!) which I use in a field update........Now I would like this formula only applying if the record has an specific record type.

 

I use 3 record types for this object and I only want to update the field if the record type of the record is equals to A??

 

 

DATEVALUE(RIGHT(date1__c,4)+ "-"+ MID(date1__c,3,2)+ "-"+ LEFT(date1__c,2))

 

 

Thanks!

 

Gizmo

Best Answer chosen by Admin (Salesforce Developers) 
Steve :-/Steve :-/

Man, I'm gonna have to start charging extra for this stuff... 

 

Here you go:

 

IF($RecordType.Name = "A",
DATEVALUE(RIGHT(date1__c,4)+ "-"+ MID(date1__c,3,2)+ "-"+ LEFT(date1__c,2)),NULL)

 

PS.  Oh yeah, you owe me a beer

 

 

 

All Answers

Steve :-/Steve :-/

Man, I'm gonna have to start charging extra for this stuff... 

 

Here you go:

 

IF($RecordType.Name = "A",
DATEVALUE(RIGHT(date1__c,4)+ "-"+ MID(date1__c,3,2)+ "-"+ LEFT(date1__c,2)),NULL)

 

PS.  Oh yeah, you owe me a beer

 

 

 

This was selected as the best answer
gizmo100gizmo100

Thanks again Stevemo !! If some day you are around Barcelona, I ´ll pay you more than one!!!:)

 

I just changed the record type name field for the record type id! and..Voila!!

 

Thanks!

Gizmo