Skip to main content

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
1 answer
3k 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>();
user avatar
8 votes
1 answer
370 views

Syntactic vs Performance difference on object creation?

Is there any performance difference between: Contact con = new Contact(); con.Id = conId; con.AccountRoles__c = newRole; ... and... Contact con = new Contact( Id = conId, ...
Nathan Williams's user avatar
8 votes
2 answers
3k views

Is there an Apex code formatting standard?

Are there any documents out there that talk about proper formatting in apex? I have not been able to find too much on this subject (maybe my google skills are weak). Some examples: //comment with ...
Tyager's user avatar
  • 574
2 votes
1 answer
635 views

Right Parenthesis Expected

I have the below code: public class CallOutForGet { HttpRequest request=new Httprequest(); http http=new http(); request.setEndPoint('https://th-apex-http-callout.herokuapp.com/animals'); ...
SfdcBat's user avatar
  • 4,811
1 vote
2 answers
21k 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 ...
Darren's user avatar
  • 13
1 vote
1 answer
2k views

Any risk in recompiling all Apex classes in org?

Running into an issue with a deployment, getting a ton of errors of the following flavor: line -1, column -1: Dependent class is invalid and needs recompilation: Class MeansRegisterCustomerTest : ...
Aavo Reinvald's user avatar
-1 votes
1 answer
1k views

Case field mapping with custom object fields?

i have posted this question earlier but i'm not getting the proper solution please read the requirement carefully.* i have a custom object Integration__c and it has fields username__c,password__c,...
Chanbasha Sk's user avatar
10 votes
2 answers
12k views

What is the best way to cast/convert Map<String, SObject> to Map<Object, Object> and back again?

To reduce code duplication, at the risk of type safety, I have some method: public Map<Object, Object> doSomething(Map<Object, Object> inputMap) { Map<Object, Object> outputMap; ...
Brian Kessler's user avatar
7 votes
2 answers
974 views

Syntax guide for working with Salesforce Web Components

I am struggling to find any syntax documentation related to building a Web Component, and could really use some help. For example, in my JS file I make a call to a custom APEX api that returns a ...
BlondeSwan's user avatar
  • 1,098
5 votes
2 answers
11k views

Map<Object, List<SObject>> cannot be cast to Map<String, List<Account>>

I'm trying to cast a Map<Object, List<SObject>> to Map<String, List<Account>>, which fails with the error Incompatible types since an instance of Map<Object,SObject> ...
ipavlic's user avatar
  • 3,736
2 votes
3 answers
9k views

record type name insert in test class

Record Type Label: Lead/Opportunity Rule Record Type Name: Lead_Opportunity_Rule throw an error Compile Error: Initial term of field expression must be a concrete SObject: String String recType ...
cloudZigZag's user avatar
  • 1,376
2 votes
2 answers
9k views

SOQL subquery access variables

Attempting to access the variables MIlestone1_Project__c has a Lookup relationship to Account with relationship name: `Projects__r'. List<Account> accList = [ SELECT Id, Name, EHR_Status__c,...
Tim's user avatar
  • 31
2 votes
1 answer
1k views

StateCode, CountryCode fields not available in SalesforceDX

I am trying to switch to DX but noticed that the CountryCode and StateCode are no longer being recognized by Salesforce in DX environment. Trying to reference those fields gives me an invalid field ...
Arthlete's user avatar
  • 4,917
1 vote
1 answer
2k views

Why am I receiving a 'Syntax Error' when using a CASE function?

I've been looking for answers to this question for a couple days now and haven't found anything. I am trying to assign a field a value (number) based on a picklist value from another field. What I'...
sunsk's user avatar
  • 11
0 votes
2 answers
589 views

Why is there a need for parenthesis on the right side of the equal sign when assigning a Map variable?

I have a question regarding the second portion of this code snippet. When using the "Map<String, Object>" assignments, why is it that I have to use parentheses around the Map<...
A_Gordoa's user avatar
0 votes
2 answers
2k views

Deployment error - dependent.class.invalid not found

I am deploying salesforce components using ANT and I am seeing this strange error and don't know what exactly it means by. I have included all the dependent components. Please let me know if anyone ...
SFDC_BigDog's user avatar
0 votes
2 answers
132 views

Initial term of field expression must be a concrete SObject : List

I have written some code to auto-close incident after 5 days in Remedyforce. But I am getting error shown below. Error Initial term of field expression must be a concrete SObject : List Code ...
Emma Watson's user avatar
-3 votes
2 answers
91 views

Accessing results from my first SOQL search

My Trigger will send an email anytime one account has 7 cases created within 8 days. Towards the bottom in my Else block, I am trying to access fields in my first SOQL statement. I have tried many ...
Timothy's user avatar
  • 39