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
recordtype leadre = [SELECT DeveloperName,Id,IsActive,SobjectType FROM RecordType where SobjectType='Lead' and DeveloperName='TestRecordtype' limit 1]
string strRecType = Schema.SObjectType.Contact.getRecordTypeInfosByName().get('Business').getDeveloperName();
Some time in code we need to get recordTypeId . For that generally we used SOQL like below :-
Id contRecordTypeId = [Select id from RecordType where sObjectType = 'Contact' and developerName ='NameOfRecordType' ].id ;
You can try below Describe to get record Type Id without SOQL
Id contRecordTypeId = Schema.SObjectType.Contact.getRecordTypeInfosByName().get('NameOfRecordType').getRecordTypeId();
Thanks
Amit Chaudhary
Thanx for your replied, but i dont want it with SOQL here............want with dynamic apex
I have used here but getting error
Please suggest me
Adv thnx
VSK