+ Start a Discussion
NehaaaNehaaa 

Advanced Apex specialist challenge step 1 I am getting this error:Ensure that you create the DEFAULT_ROWS constant and that it is an immutable property.

SandhyaSandhya (Salesforce Developers) 
Hi,

Refer below thread for similar discussion.

https://developer.salesforce.com/forums/?id=9060G0000005O22QAE
 
Best Regards,
Sandhya
NehaaaNehaaa
Hi Sandhya,
I referred the above thread but it is still not working.below is the code which I am using
public class Constants {
public    static final Integer DEFAULT_ROWS = 5;
public        static final String SELECT_ONE = Label.Select_One;
    public    static final String INVENTORY_LEVEL_LOW = Label.Inventory_Level_Low;
       public    static final List<Schema.PicklistEntry> PRODUCT_FAMILY;
    
    static {
        Schema.DescribeFieldResult fieldResult = Product2.Family.getDescribe();
        PRODUCT_FAMILY = fieldResult.getPicklistValues();
    }
    public    static final String DRAFT_ORDER_STATUS = 'Draft';
    public    static final String ACTIVATED_ORDER_STATUS = 'Activated';
    public    static final String INVENTORY_ANNOUNCEMENTS = 'Inventory Announcements';
    public    static final String ERROR_MESSAGE = 'An error has occurred, please take a screenshot with the URL and send it to IT.';
    public    static final Id STANDARD_PRICEBOOK_ID = '01s7F000009XMtJQAW';
    
}
ApuroopApuroop
Hi Neha, try the below code. I just passed the challenge.
public class Constants {
    public static final Integer DEFAULT_ROWS = 5;
    public static final String SELECT_ONE = Label.Select_One;
    public static final String INVENTORY_LEVEL_LOW = Label.Inventory_Level_Low;
    public static final List<Schema.PicklistEntry> PRODUCT_FAMILY = Product2.Family.getDescribe().getPicklistValues();
    public static final String DRAFT_ORDER_STATUS = 'draft';
    public static final String ACTIVATED_ORDER_STATUS = 'activated';
    public static final String ERROR_MESSAGE = 'An error has occurred, please take a screenshot with the URL and send it to IT.';
    public static final Id STANDARD_PRICEBOOK_ID = '01s3k000002IjuwAAC';
}

For the STANDARD_PRICEBOOK_ID, use the below query in Query editor and grab the id.
SELECT Id FROM PriceBook2 WHERE Name = 'Standard Price Book'

Hope it helps.