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
HNT_NeoHNT_Neo 

Count Event Record against Opportunity Record Type

Hello, 

I have this formula number field in the custom activities object which counts a value of 1 if an event or task record is created from the opportunity record. 
IF(NOT(ISBLANK(Opportunity__c)), 1, 0)
I want to be able to use the same concept to build a formula that will only target a certain opportunity record type. 

The Opportunity Record Type Name = XYZ

I'd like to know when an event or task is created against an opportunity record type of XYZ. 

I've attached a screenshot of the current formula we are using, in order for anyone to get an idea what I'm trying to achieve. 

User-added image

Thanks
 
Bhargavi TunuguntlaBhargavi Tunuguntla
Hi 

Try the below in your formulae field:
 
IF(AND(NOT(ISBLANK(Opportunity__c)), Opportunity__r.RecordType.Name =='XYZ'), 1, 0)

Thanks.
Raj VakatiRaj Vakati
IF(Opportunity__r.RecordType.Name =='XYZ', 1, 0)