Questions tagged [compile-error]

Compilation error refers to a state when a compiler fails to compile a piece of computer program source code, either due to errors in the code, or, more unusually, due to errors in the compiler itself. A compilation error message often helps programmers debugging the source code for possible errors.

Filter by
Sorted by
Tagged with
2
votes
1answer
70 views

Why does this VisualForce page think I'm referencing a Controller variable, instead a field inside of that variable?

Assume that I have a VisualForce page that looks like this: <apex:page controller="SearchResultController" action="{!storeSearchResults}" id="SearchResultsView"> <apex:repeat value="{!...
0
votes
1answer
774 views

Compiled formula is too big to execute error

Is there an alternative way to: Add "$" prefix to the product of (SHIPPING FEE * USD CONVERTION RATE) ROUND UP (SHIPPING FEE * USD CONVERTION RATE) to the nearest 10 dollars or nearest 100 dollars ...
0
votes
2answers
30 views

show an query error

I have a test class its shown an this error System.QueryException: unexpected token: 'BY' in this line don't get what exactly wrong with this statement public static List<PO_Line_Item__c> ...
3
votes
2answers
758 views

“Variable does not exist” Error While Reference a Package Namespace

Solved? The root cause is my inaccuracy in object initiating: i just forgot to add new. But the misleading error message is still in place. So other APEX devs may hit the same issue. Initial ...
1
vote
1answer
23 views

Apex Class compile error: Initial term of field expression must be a concrete SObject: Map<Id,Application__c>

I have a relatively simple apex class that is failing to compile. Please take a look and let me know if any of you have thoughts on what could be causing the issue... public class ...
1
vote
2answers
30 views

Initial Term of field expression mist be a concrete SObject

I want to update 2 fields on a Product record when a field is populated. The values I want to pull in are from another object so I believe the correct way is to get a filtered list of records from the ...
0
votes
1answer
312 views

Compile Error: No such column 'What' on entity 'Task' [duplicate]

I have written a trigger on case, to prevent closing the case when all the associated tasks are not closed. Facing this error while saving the trigger: Error: Compile Error: No such column 'What' ...
0
votes
1answer
1k views

Compile Error: Only top-level class variables can be declared static

@isTest private class TestRejectDoubleBooking{ public void TestSingleBooking(){ static testmethod void TestSingleBooking() { Datetime now = System.now(); Speaker__c speaker = new ...
1
vote
2answers
6k views

Illegal assignment from list to list (OpportunityContactRole to String)

I'm receiving the following error: Illegal assignment from List<OpportunityContactRole> to List<String> When I try to query from OpportunityContactRole and store it into a new list. I'...
2
votes
1answer
232 views

autocomplete form using Apex and VF

I was working on the autocomplete feature for which I have this controller and page. Controller: public class autoCompleteCon { public List<String> listOfStrings {get; set;} // ...
1
vote
1answer
141 views

Why do I get “method doesn't exist or bad signature”?

What am I doing wrong here? I have an ApexClass named SearchController, which starts with: public class SearchController and which includes these two methods: public void save_search_results(...
0
votes
0answers
149 views

Compilation Error: ChatterAnswersAuthProviderRegistration

I'm trying to validate a new apex class, but ran into a slew of test failures. Afterward I went to compile all my classes and got the following error (same error I get with the aforementioned ...
1
vote
2answers
95 views

Compile error for scheduled apex test class (expecting a right parentheses, found)

I'm getting the following error when trying to save my test class for a schedulable class: expecting a right parentheses, found 'Test' Here's the main class: global class deleteConvertedChatter ...
0
votes
1answer
1k views

Compile Error: Invalid bind expression type of List<String> for column of type String

I have a req. to map The URL that is stored in the field which holds the url of the image in the documents. In VF page I reference the field that will hold the url from the documents. So I created a ...
1
vote
1answer
3k views

How to fix this Compile Error: Expression must be a list Type

First, let me say that I did not write most of the code below. I am trying to deploy additional Apex code and this code, written by my predecessor, is failing Apex tests when I try to deploy my change ...
3
votes
1answer
1k views

Invalid field RecordTypeId for SObject Case

This evening I finally started working on an Apex Specialist Superbadge. I followed all the steps to prepare the developer org and started coding, however, I can't compile my code due to this weird ...
-1
votes
1answer
72 views

Trying to access a child object using a query but getting a compile error

Here is my Trigger trigger DailyTaskTrackersTrigger on Daily_Task_Tracker__c (before insert, before update,after insert,after update){...
2
votes
1answer
1k views

Root cause for “Entity is not org-accessible” for sharing object?

Not able to find Sharing object for custom object Apttus_Proposal__Proposal__Share; giving me error while List<Apttus__APTS_Agreement__share> st = new List<Apttus__APTS_Agreement__c>();
5
votes
2answers
270 views

“Entity is not api accessible” vs. “Variable does not exist”

I've seen this error before many times, occasionally even in my own code. Entity is not api accessible It seems like often the compiler thinks you're looking for a standard object and it can't ...
3
votes
2answers
974 views

Expecting right curly bracket, found 'else'

I am using if else loop in my method, facing this error while compilation. Expecting right curly bracket, found 'else' Here is my method: public List<SelectOption> actionTypeOptions { ...
0
votes
1answer
5k views

Only top-level class methods can be declared static

I'm really hoping someone can help me here. I have tried numerous times with this code but still get the same error. I have even used other code I have found on-line that apparently 'works', but with ...
1
vote
1answer
160 views

compilation Error when calling Component controller method from Component

I have VF Component and component controller. I am trying to call action method incomponent controller from component and receiving unknown property error. Please see below, Controller public class ...
0
votes
1answer
39 views

Apex class in Rest Services

My code fails to compile with this error: Compile Error: Incompatible element type Event for collection of CreateEventClass1.eventitems at line 41 Here is my Request Body in Postman: { "...
4
votes
0answers
111 views

compiling error during runtime for class that compiles fine

I'm getting the following error (below) while executing a future call. The mentioned class compiles and saves fine upon retesting. Any idea why this would be occurring at runtime? It seems to work ...
0
votes
2answers
119 views

Compile Error: Didn't understand relationship 'opportunity' in field path

I'm attempting to create a report that maps activity on an account, by signalling whether certain 'capabilities' (services sold) stored as picklist values are selected on all related opportunity ...
3
votes
1answer
55 views

Formula compile error with lots of dates

I am receiving this error: Error: Invalid Data. Review all error messages below to correct your data. Formula(s) that reference this field are no longer valid: Compiled formula is too big to execute (...
0
votes
1answer
5k views

Compile Error: Invalid Type

I am working towards getting my controller to pass queries into a visualforce gauge component. The first part works in that I can make a query convert to an integer and display on the chart. I want to ...
1
vote
1answer
86 views

Salesforce Transaction API version

In ORG we have multiple triggers for Opportunity with different API versions. Some of triggers are installed from managed package and have api versions 25-28. Local ORG opportunity trigger has api ...
1
vote
1answer
40 views

compile error in for loop getting group role membership

I need to get all members including members associated by their roles of a group passed in and am having trouble with the below code: List<String> roleRelatedGroupIds = new List<String>();...
3
votes
1answer
475 views

Unexpected token Error

I've created a custom button called Commit and I'm trying to call the following method using action = {!.commit}, Apex below Do I need to do anything else to be able to call commit in my VF?
0
votes
1answer
279 views

Incompatible key type List<String> for Map<String,List<String>>

Error Error: Compile Error: Incompatible key type List for Map> at line 52 column 24 Code public class contactcontoller{ public list<contact> {get;set;} public contact con{get;set;} ...
1
vote
1answer
916 views

Method must define a body error

I have a simple piece of code but I'm getting an error: Compile Error: Method must define a body at line 28 column 25. I'm new to Salesforce development and can't figure out this error global ...
0
votes
0answers
635 views

Compile Error: unexpected token: public at line 302

In order to do a mass update to data I commented out code and deployed to production. Now I'm un-commenting the code to redeploy and I'm getting the compile error. SecondSection is definitely ...
0
votes
4answers
706 views

Loop through collection

I'm new to Salesforce and this loop is bugging me: public String matchingDataGridIDs {get;set;} public void GetData(string defaultUserID) { //retrieve data for selected user ...
0
votes
2answers
628 views

getting error as Compile Error: Constructor not defined: [PageReference].<Constructor>(String)

<apex:page controller="openPage"> <apex:form> <apex:commandButton value="Open" action="{!openPage}"/> </apex:form> </apex:page> public with sharing ...
0
votes
2answers
527 views

Compiled Formula too big Max is 5,000

I was trying to enter the below formula into a new formula field to track Contract End Dates when compared to a picklist and date field, while incorporating leap years. But I hit a compile Limit, I am ...
6
votes
1answer
672 views

Exact equality operators only allowed for reference types: String

Please find below piece of code where I am getting this error. Error: Compile Error: Exact equality operators only allowed for reference types: String Code: if(((inc.Status_abv__c!=='New') || ...
4
votes
1answer
490 views

Error: Compile Error: expecting a right parentheses, found 'System.runAs' at line 4 column 22

Guys need some help in figuring out where I am going wrong. I am getting the above error at line 3. Any help is appreciated. @isTest private class LabsContactLookupPopupController_Test { public ...
0
votes
1answer
3k views

Error: Compile Error: unexpected token: '=' at line 11 column 28

@IsTest private class EmailToSalesforceTests { // Create a new email and envelope object Messaging.InboundEmail email = new Messaging.InboundEmail(); Messaging.InboundEnvelope env = new ...
2
votes
1answer
120 views

Unable to query and view parent and child opportunity

I am converting this code into parent and son opportunity public class accconhierarchy { Private list<account> acc; public List<accountWrap> accountList { get; set; } public ...