Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Variable does not exist: Consts.ACCOUNT.TYPE #1

Open
djohnsonb opened this issue Mar 27, 2023 · 4 comments
Open

Error: Variable does not exist: Consts.ACCOUNT.TYPE #1

djohnsonb opened this issue Mar 27, 2023 · 4 comments
Assignees

Comments

@djohnsonb
Copy link

djohnsonb commented Mar 27, 2023

calling

System.debug(Consts.ACCOUNT.TYPE.PROSPECT); // 'Prospect'

Error: Variable does not exist: Consts.ACCOUNT.TYPE

CLASS:

public with sharing class Consts {
    public static final AccountConsts ACCOUNT {
        get {
            return AccountConsts.INSTANCE;
        }
    }
}


public class AccountConsts {
    public static final AccountConsts INSTANCE = new AccountConsts();
    public final Type TYPE = new Type();
    public final Rating RATING = new Rating();

    public class Type {
        public final String CHANNEL_PARTNER_RESELLER = 'Channel Partner / Reseller';
        public final String CUSTOMER_CHANNEL = 'Customer - Channel';
        public final String CUSTOMER_DIRECT = 'Customer - Direct';
        public final String INSTALLATION_PARTNER = 'Installation Partner';
        public final String OTHER = 'Other';
        public final String PROSPECT = 'Prospect';
        public final String TECHNOLOGY_PARTNER = 'Technology Partner';
    }

    public class Rating {
        public final String COLD = 'Cold';
        public final String HOT = 'Hot';
        public final String WARM = 'Warm';
    }
}
@pgajek2
Copy link
Member

pgajek2 commented Jun 11, 2023

Hi @djohnsonb!

I am looking at it. I will inform you about the progress.

@pgajek2 pgajek2 self-assigned this Jun 11, 2023
@pgajek2
Copy link
Member

pgajek2 commented Jun 11, 2023

@djohnsonb did you deploy the whole code to your environment?

@djohnsonb
Copy link
Author

djohnsonb commented Jun 12, 2023 via email

@pgajek2
Copy link
Member

pgajek2 commented Jun 12, 2023

@djohnsonb Are you sure you deployed the whole force-app/main/default/classes directory at once?
I created a new org and I was able to deploy it, and System.debug(Consts.ACCOUNT.TYPE.PROSPECT); works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants