0

I'm new to APEX, so I'm going through the workbook. Got to the page about 'Using Inner Classes in an APEX Controller'. As far as I can tell, the code I've written replicates what the tutorial has advised me to write, but when I try to save the controller class I get 'Error: Unknown property 'StoreFrontController.DisplayMerchandise.Price__c', which is created as part of a List by a SOQL query. I would have expected a problem with DisplayMerchandise.Description__c, because the code example appears to be trying to match it to an instance of a field called Condition in the VF page layout which calls the controller.

2
  • 5
    Please review How to Ask. Without seeing your code all we can do is guess and provide generalizations which obviously would not help you since the error message was not enough to get you in the right direction. With your code we can be much more specific
    – Eric
    Dec 20, 2016 at 15:58
  • Sorry about that. I couldn't see a way to attach it. The fault is in the instructions. They say 'save the controller', and then go on to tell you that you have to change something in the page layout to which the price is mapped. Until you do that, the controller continues to give the error, and once it's done, both items save with no further complaint. Dec 20, 2016 at 16:20

1 Answer 1

1

As mentioned in the comment, the instructions are at fault. They tell you to save the controller, making it look as if it is saved without error, then proceed with instructions to change something in the page layout to match the definition of the Price as a currency. Once that's done, both items save with no complaint.

1
  • 1
    You should make an edit to your question to include both this answer, as well as the relevant code. Dec 20, 2016 at 20:29

Not the answer you're looking for? Browse other questions tagged .