function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sangeeta.marathe@Futurewise.cosangeeta.marathe@Futurewise.co 

test class error

public RecTypes__c getPersonRecordType(String accountName)

{ RecTypes__c PersonAccRecordType=[SELECT Name,Record_Type_Value__c FROM RecTypes__c WHERE name=:accountName limit 1]; return PersonAccRecordType; }

 

In the above code i am trying to fetch the where i am trying to fetch rows using record types...

       when i am executing my test class its telling me now rows to fetch.......

      an then it is pointing to this particular method...

      When i am executing my test class queries they are getting inserting properly

   Please help me with this.....

 

 

 

Ankit AroraAnkit Arora

Code provided is not sufficient for me to understand the problem, still I would like you to ensure that when you are inserting the account in your test class it should have a record type assigned. If won't get rec type assigned automatically if there is no default rec type set for the profile. Still would like to see a bit more piece of code if it doesn't resolved your problem.

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page