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
Christopher CosgroveChristopher Cosgrove 

Counter Record Type Issue

I am looking to create a counter for my VF pages.

I have a apex class that I am looking to pull in the record type in of the vf pages. Field is VF_Page_Visited__c object is F_Enhancement_Change_Log__c

public class myVFController{
    public string testobject{get;set;} 
    
    public pagereference myvfcontroller(){
        VF_Tracking__c newTracking = new VF_Tracking__c(User__c=UserInfo.getUserId(),VF_Page_Visited__c=SF_Enhancement_Change_Log__c.RecordType.Name,Datetime_Visited__c=datetime.now());
        insert newTracking; 
        testobject = newTracking.id;
        system.debug('newTrackingnewTracking'+newTracking);
        return null;
    }

}