You need to sign in to do that
Don't have an account?

Need help with formula field
I have custom object which is a child of Opportunity Object through a master detail relation ship.
I want to get the recordtype name of Opportunity on the child custom object record.
Formula on Opportunity Fied(Opp_rec_name__c):$ recordtype.name
Formula on Custom Object(child):Opportunity__r.Opp_rec_name__c. Do a formula field like print the current Child Object record type name. Not the Opportunity record type name.
I do not want to use the trigger to print the parent object record type name on the child object.
Is there any other way I can print the name???
$RecordType.Name will always return the record type of the current record. In Spring '13 Salesforce deprecated it, and it shouldn't be used in new formulas.
What you'll want to do is use in Opp_rec_name__c is the Record Type reference on the Opportunity itself, so it will be:
You won't need to change the field on the child custom object.
For more information, see the "Referencing Record Types in Formulas" section in the Tips on Building Formulas help topic: http://help.salesforce.com/help/doc/en/tips_on_building_formulas.htm
All Answers
$RecordType.Name will always return the record type of the current record. In Spring '13 Salesforce deprecated it, and it shouldn't be used in new formulas.
What you'll want to do is use in Opp_rec_name__c is the Record Type reference on the Opportunity itself, so it will be:
You won't need to change the field on the child custom object.
For more information, see the "Referencing Record Types in Formulas" section in the Tips on Building Formulas help topic: http://help.salesforce.com/help/doc/en/tips_on_building_formulas.htm
Thanks for the reply Shannon. I remember I tried using the recordtype reference recordtype.name in validation/formula fields. I did not work.
It is working like a charm now.
Does it have something to do with the subsequent releases??
Anyhow thanks a lot.
There's no need to change existing $RecordType formulas if they are working for you already, but going forward, plan to use RecordType instead.
Thanks.