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
apex code shareapex code share 

Please help me writing a formula to calculate the field on the basis of record type

I have a custom object-Scheme line(which has three record types i.e mechanics,reborer and  Retailers)  in this i have   fields Denomination and Quantity.


Now i want to have formula fields :-  value for mechanics,value for Reborer,value for Retailers {which is Denomination * Quantity(say 50*10)}


but in the field (value for mechanics) i want only those value which is filled in the fields (Denomination and Quantity) of record type of mechanics only

Simmilarly, for Value for Reborer will have values filled in the fields (Denomination and Quantity) for the the record type reborer only

Best Answer chosen by Admin (Salesforce Developers) 
apex code shareapex code share

I'm using this formula but its showing an error 


IF(RecordTypeId =012V0000000PirV ,VALUE( Denomination__r.Name )*Quantity__c)