+ 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;
        return null;