• Zachery Engman
  • NEWBIE
  • 235 Points
  • Member since 2014
  • Developer
  • Magnet 360


  • Chatter
    Feed
  • 7
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 15
    Replies
I am hit with other issue 'Ensure that page performance is improved by only rerendering the table and error messages when a use clicks the Add button.' I have used actionRegion to rerender the needed table,chart and messages.still it shows issues.
Hi all,

I'm getting an error while verifying step 7:
  • Challenge Not yet complete... here's what's wrong:  Ensure that you implement all the pagination methods using the corresponding StandardSetController methods.
I implemented the class using the StandardSetController methods but it doesn't work.

Any advice or suggestion?
Thank you.

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?

Hi All,

While working on the Advanced Apex Specialist Superbadge Step 7 I am facing a weird issue.
User-added image

The OrderExtension class is alreeady containing a variable of StandardSetController and in the OrderEdit page orderItemList is getting iterated.
But Salesforce doesn't support standardsetcontroller for OrderItem.

Hence getting the error: List controllers are not supported for OrderItem

Could anyone please help me, how to solve this issue.

Thanks,
Hello there!
I'm just starting to learn about Apex, SOQL and classes. But I need to create a custom button on a related list to add related objects to the list. 
Using the code in this link: https://developer.salesforce.com/forums?id=906F0000000BKaUIAW, seems to have gotten me most of the way there, but I'm referencing a custom object, not a standard one, and I'm wondering if that could be the source of the problem?

I'm getting two errors:
Line 12 Constructor not defined [PublicationControllerClass.Publications__c].(PublicationControllerClass.Publications__c)
Line 42 Invalid character in Identifer Publications__c

public class PublicationControllerClass {

    //Our collection of the class/wrapper objects cPublication 
    public List<Publications__c> publicationList {get; set;}

    //This method uses a simple SOQL query to return a List of Publications
    public List<Publications__c> getPublications() {
        if(publicationList == null) {
            publicationList = new List<Publications__c>();
            for(Publications__c c: [select Id, Name, Publication_Type__c from Publications__c limit 20]) {
                // As each publication is processed we create a new Publication object and add it to the publicationList
                 publicationList.add(new Publications__c(c));
            }
        }
        return publicationList;
    }


    public PageReference processSelected() {

                //We create a new list of Publications that will be populated only with Publications if they are selected
        List<Publications__c> selectedPublications = new List<Publications__c>();

        //We will cycle through our list of cPublications and will check to see if the selected property is set to true, if it is we add the Publication to the selectedpublications list
        for(Publications__c Pub: getPublications()) {
            if(Pub.selected == true) {
                selectedPublications.add(Pub.Pub);
            }
        }

        // Now we have our list of selected Publications and can perform any type of logic we want
        System.debug('These are the selected Publications...');
        for(Publications__c pub: selectedPublications) {
            system.debug(pub);
        }
        publicationList=null; // we need this line if we performed a write operation  because getPublications gets a fresh list now
        return null;
    }


    // This is our wrapper/container class. A container class is a class, a data structure, or an abstract data type whose instances are collections of other objects. In this example a wrapper class contains both the object Publications and a Boolean value
    public class Publications__c {
        public Publications__c pub {get; set;}
        public Boolean selected {get; set;}

        //This is the contructor method. When we create a new cPublication object we pass a Publication that is set to the pub property. We also set the selected value to false
        public Publications__c (Publication c) {
            pub = c;
            selected = false;
        }
    }
}

I'm sure I'm missing something obvious, and appreciate any help.
Thanks!
 
Hey guys, I need some help writing a formula for a combination of checkbox and number fields. Any help would be much appreciated. The logic is to have an engagement scoring model on a scale of (1-5 stars).  The engagement score is a progressive measure of an employer's performance over the fiscal year.
If the contact is a top employer (checkbox) - 1 star
If a top performer (checkbox) - 1 star
No. of in person consultations (number field) -  1/2 star for each consultation, max up to 5 consultations a total of 2.5 stars accumulated
No. of appointments booked over the phone (number field) - 1 star for each booking, max up to 3 stars accumulated
No. of seminars booked  (number field) - 1/2 star for every 3 seminars booked
Thanks.
I am trying to rehearse trigger deployment with a simple test example.  Here is the trigger and the test code.
 
trigger HelloWorldTrigger on Book__c(before insert) {

    Book__c[] books = Trigger.new;
    MyHelloWorld.applyDiscount(books);
}


@isTest
    private class HelloWorldTestClass {
        static testMethod void validateHelloWorld() {
           Book__c b = new Book__c(Name='Behind the Cloud', Price__c=100);
           System.debug('Price before inserting new book: ' + b.Price__c);
     
           // Insert book
           insert b;
         
           // Retrieve the new book
           b = [SELECT Price__c FROM Book__c WHERE Id =:b.Id];
           System.debug('Price after trigger fired: ' + b.Price__c);
     
           // Test that the trigger correctly updated the price
           System.assertEquals(90, b.Price__c);
        }
    }
I have successfully deployed the trigger but it it fails to function because of  insufficient code coverage.

This is the error message.

User-added image
This is the information from the developer console
User-added image
The trigger coverage is 100% which I thought was enough.

I am obviously missing something important so I'd apprecaite any help to:
  • Identify what code I need to add to the test class above to meet the coverage requirements.
  • Explain how I can tell from the developer console whether  tests for other triggers will pass coverage requirements.
Thanks.

 
I am hit with other issue 'Ensure that page performance is improved by only rerendering the table and error messages when a use clicks the Add button.' I have used actionRegion to rerender the needed table,chart and messages.still it shows issues.
Hi all,

I'm getting an error while verifying step 7:
  • Challenge Not yet complete... here's what's wrong:  Ensure that you implement all the pagination methods using the corresponding StandardSetController methods.
I implemented the class using the StandardSetController methods but it doesn't work.

Any advice or suggestion?
Thank you.

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?

I continutally get the following message:

The Opportunity Amount field does not appear to be tracking field value changes

I've created the following Opportunity.object file and package.xml and deployed them via workbench + metadata API

Opportunity.object
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
    <historyRetentionPolicy>
        <archiveAfterMonths>6</archiveAfterMonths>
        <archiveRetentionYears>5</archiveRetentionYears>
        <description>My field history retention</description>
    </historyRetentionPolicy>
    <fields>
        <fullName>Amount</fullName>
    </fields>
</CustomObject>

package.xml
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>Opportunity</members>
    </types>
    <version>32.0</version>
</Package>

Any suggestions as to where I've gone wrong?
On Step 5 of Advanced Apex Specialist (Increase test coverage with unit tests), I am getting the following error when checking the challenge:

Challenge Not yet complete... here's what's wrong: 
Ensure that you create an instance of product2Extension.

Reviewing the logs seems to point to a problem in a different area than testing Product2Extension.

"Assertion Failed: Expected: 10, Actual: 20" - TestDataFactory.VerifyQuantityOrdered line 15

My unit tests that use VerifyQuantityOrdered as requested pass and are working as intended. My debug statements in TestDataFactory for setting up test data and in the unit test in OrderTests are not being logged out in this anonymous block execution, pointing to a direct invocation of TestDataFactory.VerifyQuantityOrdered directly by the Trailhead anonymous Apex, passing two Products and a qtyOrdered value of 20. The first Product passed has a Quanity_Ordered__c value of 0 and the updated product passed has a Quanity_Ordered__c value of 10. Since the qtyOrdered passed is 20, the expectation is:

public static void VerifyQuantityOrdered(Product2 originalProduct, Product2 updatedProduct, Integer qtyOrdered) {
     System.assertEquals(updatedProduct.Quantity_Ordered__c, (originalProduct.Quantity_Ordered__c + qtyOrdered));
}

0 + 20 is not equalling 10 as expected. It seems to me as though the anonymous block in this step is passing the wrong value for updatedProduct.Quantity_Ordered__c.

Any recommendations?
Hi All,

While working on the Advanced Apex Specialist Superbadge Step 7 I am facing a weird issue.
User-added image

The OrderExtension class is alreeady containing a variable of StandardSetController and in the OrderEdit page orderItemList is getting iterated.
But Salesforce doesn't support standardsetcontroller for OrderItem.

Hence getting the error: List controllers are not supported for OrderItem

Could anyone please help me, how to solve this issue.

Thanks,
Challenge Not yet complete... here's what's wrong:
The 'Phone Numbers' section was not found, or it was empty. If you believe that you have set this up properly and are still having problems, ensure that you are NOT using Record types for the Contact object. This challenge will not work with Record types so you will need to sign up for a new DE org and use that instead for this module.

I have attached an image of what I beieve is correct. Not sure what all I am missing here.Image of page layput for challenge
Hello there!
I'm just starting to learn about Apex, SOQL and classes. But I need to create a custom button on a related list to add related objects to the list. 
Using the code in this link: https://developer.salesforce.com/forums?id=906F0000000BKaUIAW, seems to have gotten me most of the way there, but I'm referencing a custom object, not a standard one, and I'm wondering if that could be the source of the problem?

I'm getting two errors:
Line 12 Constructor not defined [PublicationControllerClass.Publications__c].(PublicationControllerClass.Publications__c)
Line 42 Invalid character in Identifer Publications__c

public class PublicationControllerClass {

    //Our collection of the class/wrapper objects cPublication 
    public List<Publications__c> publicationList {get; set;}

    //This method uses a simple SOQL query to return a List of Publications
    public List<Publications__c> getPublications() {
        if(publicationList == null) {
            publicationList = new List<Publications__c>();
            for(Publications__c c: [select Id, Name, Publication_Type__c from Publications__c limit 20]) {
                // As each publication is processed we create a new Publication object and add it to the publicationList
                 publicationList.add(new Publications__c(c));
            }
        }
        return publicationList;
    }


    public PageReference processSelected() {

                //We create a new list of Publications that will be populated only with Publications if they are selected
        List<Publications__c> selectedPublications = new List<Publications__c>();

        //We will cycle through our list of cPublications and will check to see if the selected property is set to true, if it is we add the Publication to the selectedpublications list
        for(Publications__c Pub: getPublications()) {
            if(Pub.selected == true) {
                selectedPublications.add(Pub.Pub);
            }
        }

        // Now we have our list of selected Publications and can perform any type of logic we want
        System.debug('These are the selected Publications...');
        for(Publications__c pub: selectedPublications) {
            system.debug(pub);
        }
        publicationList=null; // we need this line if we performed a write operation  because getPublications gets a fresh list now
        return null;
    }


    // This is our wrapper/container class. A container class is a class, a data structure, or an abstract data type whose instances are collections of other objects. In this example a wrapper class contains both the object Publications and a Boolean value
    public class Publications__c {
        public Publications__c pub {get; set;}
        public Boolean selected {get; set;}

        //This is the contructor method. When we create a new cPublication object we pass a Publication that is set to the pub property. We also set the selected value to false
        public Publications__c (Publication c) {
            pub = c;
            selected = false;
        }
    }
}

I'm sure I'm missing something obvious, and appreciate any help.
Thanks!
 
Hey guys, I need some help writing a formula for a combination of checkbox and number fields. Any help would be much appreciated. The logic is to have an engagement scoring model on a scale of (1-5 stars).  The engagement score is a progressive measure of an employer's performance over the fiscal year.
If the contact is a top employer (checkbox) - 1 star
If a top performer (checkbox) - 1 star
No. of in person consultations (number field) -  1/2 star for each consultation, max up to 5 consultations a total of 2.5 stars accumulated
No. of appointments booked over the phone (number field) - 1 star for each booking, max up to 3 stars accumulated
No. of seminars booked  (number field) - 1/2 star for every 3 seminars booked
Thanks.
I am trying to rehearse trigger deployment with a simple test example.  Here is the trigger and the test code.
 
trigger HelloWorldTrigger on Book__c(before insert) {

    Book__c[] books = Trigger.new;
    MyHelloWorld.applyDiscount(books);
}


@isTest
    private class HelloWorldTestClass {
        static testMethod void validateHelloWorld() {
           Book__c b = new Book__c(Name='Behind the Cloud', Price__c=100);
           System.debug('Price before inserting new book: ' + b.Price__c);
     
           // Insert book
           insert b;
         
           // Retrieve the new book
           b = [SELECT Price__c FROM Book__c WHERE Id =:b.Id];
           System.debug('Price after trigger fired: ' + b.Price__c);
     
           // Test that the trigger correctly updated the price
           System.assertEquals(90, b.Price__c);
        }
    }
I have successfully deployed the trigger but it it fails to function because of  insufficient code coverage.

This is the error message.

User-added image
This is the information from the developer console
User-added image
The trigger coverage is 100% which I thought was enough.

I am obviously missing something important so I'd apprecaite any help to:
  • Identify what code I need to add to the test class above to meet the coverage requirements.
  • Explain how I can tell from the developer console whether  tests for other triggers will pass coverage requirements.
Thanks.

 
Hello,

I'm not able to finish the following trailhead:
Build and Administer Wave Analytics --> Wave Dashboard Designer Basics --> Add Selectors That Allow Users to Filter the Dashboard Results

I've implemented everything, but I got the following Error Message, if I push the button "Check Challenge":
Challenge Not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: FZVPTGTG

I've tested with a new developer org, but I got the same issue.

Could you please help me that I can finish this trailhead.

Many thanks in advance
I am working on the "Add Selectors That Allow Users to Filter the Dashboard Results" Wave module in Trailhead, and the challenge is "
You already created list widgets for opportunity owner and stage, but being able to filter by product family can help your sales team focus on the sales for each product line. Create a third list widget for product family in the Sales Performance dashboard. Update the widget title, then save the dashboard.

Dashboard: Sales Performance
App: My Private App
Widget Title: Product Family
There are 5 sections in this modules, this is the 4th.  In the 2nd section, I created the Sales Performance dashboard.  Since passing the 2nd section, I have completed one multiple choice challenge, no other changes have been made in the org.  

When submitting the challenge, I receive the following error
Challenge Not yet complete... here's what's wrong:&nbsp; There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: BSLZQUSC
Challenge Not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: BSLZQUSC
"
 
I have created 2 new Wave Dev accounts, and with my existing account and the two new dev accounts, I receive the error.  Any ideas?