apex-consts icon indicating copy to clipboard operation
apex-consts copied to clipboard

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

Open djohnsonb opened this issue 1 year ago • 4 comments

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';
    }
}

djohnsonb avatar Mar 27 '23 15:03 djohnsonb

Hi @djohnsonb!

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

pgajek2 avatar Jun 11 '23 10:06 pgajek2

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

pgajek2 avatar Jun 11 '23 11:06 pgajek2

Yes We tried to deploy all but it failed.

Thanks & Regards, Devaraj johnson B Senior Specialist | Commerce & Content Technology | Deloitte Digital Tel/Direct: +1 470 434 0995 | Mobile: +91 9047191984 @.@.> | www.deloitte.com Please consider the environment before printing.

From: Piotr Gajek @.> Date: Sunday, 11 June 2023 at 4:47 PM To: beyond-the-cloud-dev/apex-consts @.> Cc: Johnson B, Devaraj @.>, Mention @.> Subject: [EXT] Re: [beyond-the-cloud-dev/apex-consts] Error: Variable does not exist: Consts.ACCOUNT.TYPE (Issue #1)

@djohnsonbhttps://github.com/djohnsonb did you deploy the whole code to your environment?

— Reply to this email directly, view it on GitHubhttps://github.com/beyond-the-cloud-dev/apex-consts/issues/1#issuecomment-1586120930, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANSQZNIEA2KCGDGJPC6GTYLXKWSMBANCNFSM6AAAAAAWJJYGDI. You are receiving this because you were mentioned.Message ID: @.***>

This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and any disclosure, copying, or distribution of this message, or the taking of any action based on it, by you is strictly prohibited.

Deloitte refers to a Deloitte member firm, one of its related entities, or Deloitte Touche Tohmatsu Limited ("DTTL"). Each Deloitte member firm is a separate legal entity and a member of DTTL. DTTL does not provide services to clients. Please see www.deloitte.com/about to learn more.

v.E.1

djohnsonb avatar Jun 12 '23 03:06 djohnsonb

@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.

pgajek2 avatar Jun 12 '23 06:06 pgajek2