Hot answers tagged


This is a feature that the community has wanted since at least 2009. The ability to organize your code metadata in to folders. It can make finding and managing code easier. Of course, this is only client-side, but it does help organize your code, and you should take advantage of it, especially if you have a lot of classes. There are three limitations to this ...


I suspect that this is mostly an issue of how you've chosen to share your code (i.e. what you've shared with us is not your actual code, and you've made some mistakes in trying to obfuscate your code), but... As written, that if block is impossible to enter and impossible to test. The local variable abc is not accessible from outside of myMethod(), so it ...


If you want to query the parent object field in SOQL you should use __r . Can you change you query as below and try. SELECT id,Name,Customer__r.Name FROM Room__c


Nicely the error message tells you what's wrong. As per the other answer you need to change Customer__c custom field name to Customer__r in order to then access a field from that related object, as in Customer__r.Name. Only standard Salesforce object and field names omit the __c suffix and do not require an __r. For example, a Contact has a related Account ...

Only top voted, non community-wiki answers of a minimum length are eligible