function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Hi,
I have got the id of the record type. But I dint know how to get the value(name) of the record type. Pls tell the the code to get the value of the record type.
Thanks
anu
if you have the recordtype id, you can get the name by SOQL query. for example
Select r.Name, id From RecordType r where r.id='01290000000IjbNAAS'
hello pls help me
Hi
You can do that in this way.
To get the particular Recordtype of an object use this,
Recordtype[] rec=[select id,name from recordtype where id='012900000006H4W' and sobjecttype='Account'];
Use this Query when you need the name of Account when you know the Recordtypeid.
Account[] Ac=[select id,name,recordtypeid from Account where Recordtypeid='012900000006H4W'];
Hi Anuraj,
If you're using a custom object, you might be able to try.
SELECT cutomobject__r.RecordType.Name FROM customobject__c WHERE customeobject__r.RecordType.id = 'xxxxxxxxxx';
if you have the recordtype id, you can get the name by SOQL query. for example
All Answers
hello pls help me
if you have the recordtype id, you can get the name by SOQL query. for example
Hi
You can do that in this way.
To get the particular Recordtype of an object use this,
Recordtype[] rec=[select id,name from recordtype where id='012900000006H4W' and sobjecttype='Account'];
Use this Query when you need the name of Account when you know the Recordtypeid.
Account[] Ac=[select id,name,recordtypeid from Account where Recordtypeid='012900000006H4W'];
Thanks
Hi Anuraj,
If you're using a custom object, you might be able to try.
SELECT cutomobject__r.RecordType.Name FROM customobject__c WHERE customeobject__r.RecordType.id = 'xxxxxxxxxx';