Here opp.recordtypeid is the record type id of opportunity.Also, you will have to specify your SObject type, here I have mentioned Opportunity.
——————————-Hope this will help you!—————————
Here opp.recordtypeid is the record type id of opportunity.Also, you will have to specify your SObject type, here I have mentioned Opportunity.
——————————-Hope this will help you!—————————
Try the below:-
Get Recordtype Id by Name:-
Id devRecordTypeId=
Schema.SObjectType.Account.getRecordTypeInfosByName().get(‘Development’).getRecordTypeId();
Here, ‘Development’ is the record type’s name. You shuld use ‘someone’. Also, you will have to specify your SObject type, here I have mentioned Account.
Get Recordtype name by Id:-
for(opportunity opp : trigger.new){
string recordtypename =
Schema.SObjectType.Opportunity.getRecordTypeInfosById().get(opp.recordtypeid).getname();
}