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
5
votes
1answer
32 views

Compiled size of formula field error when using unlocked packages

So I was working on a task to package some metadata using the unlocked packages that I retrieved from an org. Some of the metadata are objects and they have different field types, of them are formula ...
1
vote
1answer
69 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 : ...
0
votes
1answer
172 views

Problem with Safe Navigation Operator

I'm trying to understand and use safe navigation operator . So, this is the original line - List<Opportunity> oppList = (List<Opportunity>) Database.query(query.toSOQL()); return ( oppList....
0
votes
2answers
360 views

Unexpected token error in If statement in LWC Javascript controller

This is a basic javascript question. FYI the context is: It is in a Javascript controller for a Salesforce Lightning Web Component, editing in Visual Studio. The code is for selecting a set of table ...
7
votes
1answer
203 views

Class <classname> : Expression is too long, please split this expression into multiple statements

I have never seen this error before. It comes up when trying to run a test in Production. It happens when promoting the class (with just some capitalization changed, so it's not a real change) to ...
1
vote
2answers
27 views

Error: /apex/lightningAccountLayout: Syntax error and Syntax Error

I'm running into these two errors and am not sure why. Any suggestions? Error: /apex/lightningAccountLayout: Syntax error Error Error: Syntax error I'm new to SF, and just learning Apex. I'm also ...
0
votes
1answer
26 views

How can I escape the the double quoted xml in AMPscript

After I use http call to get xml from an endpoint, i got this xml; "<root><listing bedrooms="3" bathrooms="2.0" /><listing bedrooms="" bathrooms="...
3
votes
2answers
723 views

Lightning Web Component (LWC) Class Definition Syntax

Lightning Web Components (LWC) are made up of multiple files in a bundle. For this question I am focusing on the component's main .js file where the web component js class is implemented. Example code:...
0
votes
2answers
32 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<...
-1
votes
1answer
46 views

“Variable does not exist” error in catch block even when the variable is outside the try block

I have written a batch class and using try-catch in its execute method. But on saving the class, getting variable does not exist error. Sample code is given below: global void execute(Database....
0
votes
1answer
34 views

Loop must iterate over collection: Account

In the code below, I get compiler error on Loop must iterate over collection: Account Can anyone help me about this issues. list<Account> acc =[Select Id, (Select Id, Name from ChildAccounts) ...
0
votes
0answers
40 views

Formula Syntax Error

So I found a subflow example to extract values from a multipicklist on a visual flow received as a input parameter. The process involves formulas but doesn't compile due to a syntax error. I've been ...
0
votes
1answer
54 views

Comparing dates (Months) in a IF Statement

I need to compare two dates in Months in Salesforce Opportunity opp Target targ If (Month(Opp.closeDate)== Month(targ.Target Date) { Add the target Id in Map } And the Id will be Queried in SOQL.This ...
0
votes
1answer
14 views

Compile error in Controller

Error: Compile Error: Expecting "]" but was "AND" at line 30 column 133 accounts = [SELECT id FROM account WHERE id=: acc.id LIMIT 1]; tot=totalRecs = [select count() from Asset WHERE Status = '...
1
vote
1answer
34 views

Syntax for rule with multiple pick list

I'm new to creating validation rules and am having problems with the syntax. I want to trigger an error message if a picklist question is not answered when closing an opportunity. I have viewed ...
0
votes
1answer
289 views

Illegal assignment from integer to string Error received

I am getting Illegal assignment from integer to string Error *//Map declaration* Map<String, integer> PhoneMap = new Map<String, integer>(); *//adding Map values* PhoneMap.put('IPhone',...
0
votes
1answer
28 views

Error: Syntax error. Missing " on billing state in account object

I'm trying to assign a territory based on BillingState field in Salesforce and getting syntax error message Error: Syntax error. Missing " IF(ISBLANK(BillingState), "None", IF(CONTAINS("CA:WA:...
12
votes
1answer
178 views

Why is CaseFeed.CreatedById Polymorphic?

A polymorphic lookup is, by definition, one where the SObjectType of the parent be multiple different values. That was the basis for how I compiled Polymorphic keys - definitive list? However, a ...
3
votes
0answers
263 views

Baffling compile error: “A non foreign key field cannot be referenced in a path expression: ChangeEventHeader”

Why is it that this will not compile: trigger AccountChangeTrigger on AccountChangeEvent (after insert) { String dmlType = Trigger.new[0].ChangeEventHeader.changetype; ... A non foreign key ...
1
vote
2answers
1k 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,...
0
votes
1answer
26 views

Trigger code error

I am really new to triggers and not sure how I fix this error, please help. Thank You, Lorr
-3
votes
2answers
73 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 ...
-1
votes
2answers
179 views

Send email to List of addresses

Please help with the syntax for my message.toAddresses accepts a List. Error message Initial expression is of incorrect type, expected: String but was: List<String> My Code: List<...
-1
votes
1answer
28 views

Accessing SOQL results

How do I access the fields coming from the Parent_Project_if_applicable__r Relationship? Syntax assistance. List<Case> caseList = [SELECT Id, AccountId, Account.Name,...
0
votes
1answer
1k views

Constructor Syntax in Batch Class

I'm new to the development side with no real development background in any language. So I wrote this batch class, and I can't quite figure out how to implement the proper syntax for the constructor. ...
0
votes
1answer
1k views

Illegal conversion from String to System.HttpResponse

I Have the class AnimalLocator and a method getAnimalNameById HttpResponse response = http.send(request); if(response.getStatusCode() == 200){ Map<String, Object> results = (...
1
vote
1answer
427 views

List<List<SObject>> in apex:attribute type

My visualforce component has the following attribute: <apex:attribute type="SObject[][]" name="var" description="Variable to store results in." assignTo="{!searchResults}" required="true"...
1
vote
1answer
513 views

Why is this SOQL query giving error saying variable does not exist

I am getting error saying variable SBQQ__LineItems__r does not exist when I try to have values saved in the List with below SOQL on CPQ. What could be the issue here: List<SBQQ__Quote__c> qte = ...
0
votes
1answer
862 views

Error: Invalid Type

What is it I am doing to get the invalid type error? public with sharing class MyController { public list<JSONWrapper> wrapper {get;set;} public integer appTotal{get;set;} ...
0
votes
1answer
39 views

Apex method fails to execute

There are 2 classes: Dataclass and Sortclass. The Dataclass is processing and storing data. The Sortclass must sort data. But when I call the sorting method from Sortclass I get the error: "Method ...
3
votes
1answer
32 views

Formula field with several nested functions - can't get right syntax

Trying to create a text formula field that returns certain texts based on combinations of possible values in other fields. Every time I update the syntax, I get an error message either about ...
-1
votes
1answer
284 views

Error — Class ContactBatch must implement the method: System.Iterable<SObject> Database.Batchable<SObject>.start(Database.BatchableContext)

I am getting error in below code. Class ContactBatch must implement the method: System.Iterable<SObject> Database.Batchable<SObject>.start(Database.BatchableContext) Code: global ...
2
votes
1answer
1k views

System.StringException: Unexpected end of expression

Error: Line: 3, Column: 1 System.StringException: Unexpected end of expression. Class: public class OppSchedule implements schedulable{ public void execute(SchedulableContext sc){ ...
4
votes
1answer
168 views

SOQL Not Recognizing Field?

I have this apex code: //testing code for above List<Contact> contacts = new List<Contact>(); for (MtgPlanner_CRM__Transaction_Property__c lo : [SELECT MtgPlanner_CRM__Borrower_Name__c, ...
-1
votes
1answer
494 views

Error: Compile Error: Found punctuation symbol or operator '%' that isn't valid in Apex. at line 14 column 362

global class ABI_SFA_TAC_Removal_Batch implements Database.batchable<sObject> { // variable decleration. public String Query; /* Method Name: Start Description: This ...
2
votes
1answer
327 views

What is wrong with my Flow Interview?

I am working on including a Flow via Custom Button, and so I created a Visualforce Page which includes a <flow:interview> component and references a Flow.Interview on an extension. Page <...
-1
votes
1answer
190 views

Illegal Assignment List to List - Custom Class in Test Class

In an apex class and test class I have a custom class that I use to compile custom attachment result records. public class attachmentResult{ public string name {get;set;} public string ...
2
votes
1answer
291 views

TimeZone.getTimeZone(tz) where String tz equals a supported (I think) timeZoneIdString throws 'Method does not exist or incorrect signature' error

Converting code to utilize the TimeZone class for easier maintainability. For now, I'm stuck relying on a pseudo-timezone field on contacts (c.Time_Zone__c below) to make the determination and setting ...
0
votes
1answer
92 views

We want to get a list of lead and opp. that have the same date (custom fields) in the record as the actual shown lead

What we did so far... We created a visual force page that calls a class and added an extension to get the ID. We got some Error :) (We try to get the ID for the currently displayed Lead, which ...
2
votes
2answers
489 views

Error: Syntax error. Missing ')' for CASE Statement

I've created a text formula field, but I've been hitting a wall with the CASE portion of the formula: I keep getting the "Error: Syntax error. Missing ')'" message. Here's what I created: Account....
0
votes
1answer
53 views

soql Expression cannot be assigned

list<dnc_suppression__c> dncsup = new list<dnc_suppression__c>(); dncsup = [ select id, vin__c, DNC_Owner_Ind__c, First_Name__c, Email_Ind__c, Campaign_ID_1__c, ...
1
vote
2answers
211 views

SYNTAX ERROR “)” ON DATE RANGE

I'm trying to segregate records by month name for the first three months of the year. Everything with a date range of 1/1/19 through 1/31/19, should return JAN, for example. I'm getting syntax ...
0
votes
1answer
33 views

Error: Syntax error. On Custom Field

I have the following formula for a Checkbox in Salesforce and it keeps giving me the following error. I am trying to have this box check if "Trip A (or B), 2 Weeks, 1 Week or 3 Days is true along ...
1
vote
1answer
91 views

Save error: Method does not exist or incorrect signature: void includes(String) from the type String

I've been receiving this error and need some help resolving it. for(LP_TFL__c tfl : termForLoanList0) { for(ScorecardTier scorecardTier : scorecardTierList0) { //Compare Tiers String ...
0
votes
1answer
210 views

Error: Syntax error. Missing ')' in formula

I keep getting 'Error: Syntax error. Missing ')' in my code. Any help would be greatly appreciated. Thank you! if(Owner.Trip_A_1_Week__c=TRUE,TRUE, IF(Owner.Trip_A_2_Weeks__c =TRUE,TRUE, IF(Owner....
0
votes
1answer
129 views

Where to look for in debug: list index out of bounds

I am trying to debug a piece of code where I get the error : list index out of bounds: 0 In this case do I need to look for:ZcheckoutBaseFor.validateConfiguration() or could this also be :...
0
votes
1answer
1k views

Invalid character in identifier

I am getting an error on my JSON2Apex class: Error:(7, 18) Invalid character in identifier: Holding_to_Fund__r Error:(44, 19) Invalid character in identifier: Holding_to_Fund__c I need to parse ...
7
votes
2answers
759 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 ...
0
votes
1answer
110 views

Unknown property when using html-data-id attribute in apex:dataTable

I am getting a unknown property error, when using the var from data table in a html-data-id attribute, it is working in apex attributes perfect. I can't figure out how to make it work for html-data-id ...
0
votes
1answer
1k views

Adding custom button to custom object in lightning

Followed instruction from DocuSign to add custom button to custom layout in lightning. Any idea why it may not be working? I'm in Sandbox environment. Error: Error: Syntax error Code: {!URLFOR(‘/...

1
2 3 4 5