You need to sign in to do that
Don't have an account?
Superbadge Advanced Apex challenge 6
Receiving error:
Challenge Not yet complete... here's what's wrong:
Ensure that you modify the COLLABORATION_GROUP query to use the INVENTORY_ANNOUNCEMENTS constant.
static List<CollaborationGroup> COLLABORATION_GROUP = [SELECT Id FROM CollaborationGroup WHERE Name = : Constants.INVENTORY_ANNOUNCEMENTS OR Name = : 'Test'+Constants.INVENTORY_ANNOUNCEMENTS LIMIT 1];
Tried every variation of the query I could think of (database.query, lowercase class reference, only one 'WHERE' clause, no limit, space after 'Test'...all getting same error). Running the above in anonymous apex works fine and returns expected values. Debugged the class and all uses of the Collaboration_Group to verify it's returning the expected values. The rest of the challenge's functionality is as expected: the announcement is made to the group when criteria is met. Nothing appears to be wrong in the logs created when checking the challenge. One of the logs shows the anonymous apex asserting the results of a very similar query. Is there a best practice I'm missing in referencing the constant inside the query?
Maybe also just double-check your constant is defined as such:
public final static string INVENTORY_ANNOUNCEMENTS = 'Inventory Announcements';
All Answers
Maybe also just double-check your constant is defined as such:
public final static string INVENTORY_ANNOUNCEMENTS = 'Inventory Announcements';