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.

10 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
0answers
121 views

@deprecated annotation issue in Managed Apex

We have 2 managed packages. Let's name those MPMAIN and MPCHILD. MPCHILD package is dependent on MPMAIN. In MPCHILD we have a class: @deprecated global class ChildClass extends MPMAIN.MainClass { ...
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
1answer
313 views

Getting Error “Global variable must be contained inside of a global class”

I have a class which is global and extending another class (which is managed packaged file): global with sharing class cc_b_ShippingAndHandling extends ccrz.cc_api_ShippingAndHandling { double ...
0
votes
1answer
48 views

Simple Trigger not working

I am fairly new to salesforce and I am having a bit of trouble with apex code. trigger HelloWorld on Lead (before update) { for (Lead 1 : Trigger.new) { 1.FirstName = 'Hello'; 1....
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 ...
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 ...
-1
votes
1answer
151 views

SOQL Query within controller Custom Permission

I'm trying to query what custom permission the current user has. I will have to query this in a few places so I was trying to avoid putting it in every single controller class. Maybe putting it in ...
-1
votes
1answer
92 views

Can some one help me create a trigger for auto creating 5 child records when parent record stage is closed

Hi I tired creating below trigger but it is giving me this error: Loop variable must be of type CSM_Milestone__c trigger CSMMilestone on CSM_Milestone__c (After insert, After update) { List&...
-1
votes
1answer
33 views

Relationship fields error?

In my trigger i get the error like this at compile time List<ID> cIds = new List<ID>(); for(Case cObj : Trigger.new){ if(cObj.Account.Name != null && ...
-4
votes
2answers
263 views

How to solve Error: Compile Error: Field is not writeable error for ListPrice Field on opportunity Line Item

I am trying to assign the List Price field on OpportunityLineItem to 0 using trigger but receiving the Compile Error as: Field is not writable error. for(OpportunityLineItem oli: trigger.new) { ...