You need to sign in to do that
Don't have an account?
Certified sfdc
Ensure that the PricebookEntries are saved on the standard Pricebook.
HI All,
I am trying to complete PD 2 Superbadge (Advanced Apex Specialist), I have tested every product and pricebookentry records, still i am not able to complete challenge.
Update the new product Visualforce page(Update the Product2New Visualforce page and Product2Extension class to meet the business requirements.)
Challenge Not yet complete... here's what's wrong:
Ensure that the PricebookEntries are saved on the standard Pricebook.
please suggest.
Thanks
I am trying to complete PD 2 Superbadge (Advanced Apex Specialist), I have tested every product and pricebookentry records, still i am not able to complete challenge.
Update the new product Visualforce page(Update the Product2New Visualforce page and Product2Extension class to meet the business requirements.)
Challenge Not yet complete... here's what's wrong:
Ensure that the PricebookEntries are saved on the standard Pricebook.
please suggest.
Thanks
p.pricebookentryrecord.Pricebook2Id = constants.STANDARD_PRICEBOOK_ID;
and
ApexPages.addMessage(new ApexPages.Message( ApexPages.Severity.ERROR,constants.ERROR_MESSAGE));
resolved both issues
Thanks
All Answers
- Validate that all the fields have a value. If all the fields have a value, add the products to a list, and insert the list
2. Then relate the products to a pricebook, by creating pricebook entriesThen insert the list of pricebook entries.
Please paste your code so that we can suggest how to move forward.
Here is my wrapper
public class productWrapper{
public product2 productRecord {get;set;}
public pricebookEntry pricebookEntryRecord{get;set;}
public productWrapper(){
productRecord = new product2(Initial_Inventory__c =0);
pricebookEntryRecord = new pricebookEntry(Unitprice=0.0);
}
}
p.pricebookentryrecord.Pricebook2Id = constants.STANDARD_PRICEBOOK_ID;
and
ApexPages.addMessage(new ApexPages.Message( ApexPages.Severity.ERROR,constants.ERROR_MESSAGE));
resolved both issues
Thanks