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
Lisa HorneLisa Horne 

Variable does not exist error

Trying to create a controller that references a custom object Called Parent Implementation.  And getting an error can someone please help?

[Error] Error: Compile Error: Variable does not exist: Parent_Implementation__c.Clarizen_Project__c at line 16 column 43

public class ParentImplementationClarizenController {

     private final Parent_Implementation__c parentimplementation;
    private final clzV5__Clarizen_Project__c project;
    private boolean error = false;
    private String errorText = '';
    private String html = '';
    private String baseUrl;
    private boolean projectExists = false;
    private final Account account;
    private final List<clzV5__Clarizen_Milestone__c> milestones;
    
     public ParentImplementationClarizenController(ApexPages.StandardController stdController) {
        System.debug('Accessing constructor for ParentImplementationClarizenController');
        this.implementation = (Parent_Implementation__c) stdController.getRecord();
        System.debug('Clarizen id is: ' + Parent_Implementation__c.Clarizen_Project__c);
 
Balaji BondarBalaji Bondar
Hi Lisa, 
Try below code:
public class ParentImplementationClarizenController {

     private final Parent_Implementation__c parentimplementation;
    private final clzV5__Clarizen_Project__c project;
    private boolean error = false;
    private String errorText = '';
    private String html = '';
    private String baseUrl;
    private boolean projectExists = false;
    private final Account account;
    private final List<clzV5__Clarizen_Milestone__c> milestones;
    
     public ParentImplementationClarizenController(ApexPages.StandardController stdController) {
        System.debug('Accessing constructor for ParentImplementationClarizenController');
        this.implementation = (Parent_Implementation__c) stdController.getRecord();
        implementation = [select Id, Clarizen_Project__c from Parent_Implementation__c where Id=:implementation.Id];
		System.debug('Clarizen id is: ' + implementation.Clarizen_Project__c);

Important :
If this is what you were looking for then please mark it as a "SOLUTION" or You can Click on the "Like" Button if this was beneficial for you