Blogs
-
Attempting to obtain method references using the REST version of the Tooling API.
Problem /services/data/v36.0/tooling/query/q=Select+Id,Name,SymbolTable+From+ApexClass+where+Name+in+(‘MyApexClass’,’MyApexClassTwo’) Why all references = null, if I call testA() in testB() in class ‘MyApexClass’ and then tesB() in testC() in external class ‘MyApexClassTwo’? Solution As you have found, you need to use an ApexClassMember to access the full SymbolTable. The ApexClassMember’s often don’t exist for the class of interest, so you must create them. The same…
-
How to present a list of text with bolded information sourced from Apex code
Problem In our scenario, I need to display a list of text in our Visualforce page. Some part of the text needs to be bold. I will explain this with the below simple but not working example: page: Controller: Obviously the strong tag here doesn’t work. I can walk around this if the number of…
-
How to Decode JSON Response in Apex Salesforce.
Synopsis There have been instances when I found myself uncertain about the process of parsing a JSON string to extract the desired information. Now, let’s explore how this can be accomplished. Example JSON This is the simplest method I’ve attempted so far. Just copy the JSON string above and utilize the Apex generator tool to…