+ Start a Discussion

Count Event Record against Opportunity Record Type


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

Bhargavi TunuguntlaBhargavi Tunuguntla

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

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