You need to sign in to do that
Don't have an account?
Mubarak Hussain 1
RecordType in TestClass
Hi all,
How to include the following recordtypes in the testclass.
Apex Class.
Mubarak
How to include the following recordtypes in the testclass.
Apex Class.
for(case c:clist) Id rtid=c.recordtypeId; if(rtid=properties.New_record_type.id){ c.recordtypeId=properties.New_record_type.id; } elseif(rtid=properties.Old_record_type.id){ c.recordtypeId=properties.Old_record_type.id; }Thanks
Mubarak
Use the following code to use the recordtype id in test class.
Please do query on your RecordType name, like this :
List<RecordType> rtypes = [SELECT Name, id FROM RecordType WHERE sObjectType='Object ApI name and Name = 'RecordTypeName';
Thanks,
Vishal
The above replies are resolve your issue , please choose the one as a best answer
No, still am getting the same code coverage,that particular code parts is not covered
Now its covered.i made a small mistake while typing.
Thanks for your quick reply.