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
1 vote
1 answer
26 views

Variable does not exist compile error

I am running into the good ol' variable does not exist error while creating a simple trigger on the case object. As other posts here have suggested, I've checked for a class with the same name as Case ...
John Gilani's user avatar
0 votes
1 answer
31 views

Property type misidentification in VisualForce Page

I'm deploying all the code from a 1stGen Package to a new Scratch org, to improve our development/testing/release process. There were a few deploy errors but I've fixed all but two types. This is one ...
cyberspy's user avatar
  • 210
-1 votes
1 answer
41 views

Formula Syntax Error (Account to Quote)

We are trying to create a basic formula field to pull an account field into the quote object (see below) Account.Customer_Registration_No__c However the syntax errors out advising "Field Account ...
Orion18's user avatar
0 votes
1 answer
52 views

Syntax Error - Summary Level Formula

Baby SF user here, I cannot get past this Syntax error saying I am missing a ')' in this formula: ( ( SUM( CASE WHEN BucketField_77200030 = 'Promoter' THEN 1, ...
Ana 's user avatar
  • 11
-1 votes
2 answers
54 views

Row level formula - Syntax error. Extra IF

I'm looking to group company segments by using a Country lookup. I have a string that looks up a specific country (i.e. DE) and then a CONTAINS function which is looking up more than one Country (GB ...
Stephen Clarke's user avatar
0 votes
1 answer
59 views

Apex Trigger - Compile error

I would like compile my apex triggers, but I receveive the following errors. Same message when i would like deploy apex on my production... :[ (i'm administrator, not dev). Could you help me please ? ...
Mat Skz's user avatar
1 vote
1 answer
61 views

Issues with Json2Apex

I've generated JSON2APEX class for complicated JSON, but when I created an instance of this class I can't deploy class where this instance is created, compilator doesn't see inner classes and throws &...
RandomNickname23's user avatar
0 votes
1 answer
648 views

Could not build module 'SFMCSDK' & module 'MarketingCloudSDK'

it's Ian, an iOS dev. My client wants to migrate the push notifications campaigns management of their iOS and Android apps to Salesforce. I'm facing compile issues after adding the marketing libraries ...
Ian Magarzo's user avatar
0 votes
1 answer
792 views

Error: Compiled formula is too big to execute (21,063 characters). Maximum size is 15,000 characters

I am trying to save the following formula field but it is giving me error. TEXT( MOD( FLOOR( TT_Calculate_Time_Elapsed__c), 24) ) & " Hours: " & TEXT( ROUND( MOD(...
Marjan's user avatar
  • 15
0 votes
1 answer
292 views

IF statement for Distance - Flow

I am trying to create a screen flow without using a loop to display "Nearby Accounts" (within 10 miles). However I am getting an error as seen in the below screenshot. I am fairly new to ...
Timmy's user avatar
  • 11
1 vote
1 answer
935 views

System.DmlException: Insert failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, invalid cross reference id: []

I am a newbie to Apex programming in Salesforce so I have been basing my code off of the example code found here: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/...
CDutko's user avatar
  • 15
0 votes
1 answer
334 views

Invalid constructor syntax, name=value pairs can only be used for SObjects: Calendarview

I am attempting to create a CalendarView object for my users. I am basing it off of the example code found here: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/...
CDutko's user avatar
  • 15
0 votes
1 answer
169 views

Example Code from CalendarView Object Doesn't Compile?

I am attempting to create a calendar view object for my users. It is my first forray into Apex programming, so I have been referencing the example code in the developer docs. I ran into an issue with ...
CDutko's user avatar
  • 15
1 vote
1 answer
107 views

Compile all Flows?

Is there a simple mechanism to "compile all Flows" (e.g. in the way there is for Apex classes and triggers)? If not, what's the next fastest way to verify that dependencies aren't broken ...
Brent Bowers's user avatar
  • 3,144
5 votes
1 answer
2k views

Illegal assignment from List<Location> to List<System.Location>

Here's the SOQL I'm trying to run in my anonymous window, against the standard object: List<Location> locs = [SELECT Id, Name FROM Location LIMIT 2]; for(Location l : locs) { System.debug(l....
bkwdesign's user avatar
  • 599
1 vote
1 answer
211 views

HttpPut methods do not support parameter type of [user defined type]

I'm at a loss. This class already compiled, was deployed, and has been working fine in production for over a year. Upon updating it, I'm now getting: HttpPut methods do not support parameter type of ...
Mike's user avatar
  • 1,199
0 votes
1 answer
56 views

Can't seem to execute code against an unmanaged package

I'm relatively new to using unmanaged packages and have run into a (likely) simple issue. I'm currently attempting to execute some anonymous code against a package that I installed today, however I am ...
Rockdocta's user avatar
  • 154
-2 votes
1 answer
138 views

Error: incorrect signature: void get(Id) from the type String and Missing retrn statement reqired return type [closed]

@AuraEnabled public static ResponseWrapper dupNameCheck(Persons__c record, string srId, string pageId) { list < string > id = new list < string > (); list < Persons__c > ...
CHINNA's user avatar
  • 9
0 votes
1 answer
75 views

Test class compilation error Claim and ClaimParticipant

I am creating test class involving Claim and ClaimParticipant standard objects. While inserting these records, I am getting errors like Variable does not exist: Name and DML requires SObject or ...
Jigar Trivedi's user avatar
0 votes
1 answer
47 views

Workflow rule to update contact field. Syntax error missing ")" [closed]

I have a custom object with a picklist field. When the picklist is selected I want a field on the contact object to be filled with the selected value. I am trying to create the formula for the rule ...
BFP2044's user avatar
  • 11
-1 votes
1 answer
2k views

Flow formula expression is invalid: Syntax error. Found ')'

I am also running into the same error The formula expression is invalid: Syntax error. Found ')' I am trying to create a formula in a flow. IF ( {!radio_Please_select_a_product} == {!...
user115088's user avatar
-1 votes
1 answer
371 views

How do I assign objects and get foreign keys etc

Here's a basic function I have. I don't regularly use Apex, so I'm not sure how to address the various parents and children of objects and assign them, I'm sure there's a tricky bit with the Ids. ...
Henrietta Martingale's user avatar
1 vote
0 answers
576 views

"Dependant class invalid needs recompilation" error after upgrading to API version 53

I have upgrade some classes in my org to version 53, while deployment i get the error " Dependant class is invalid needs recompilation". As per the Salesforce article I have tried compiling ...
Diviya John's user avatar
3 votes
1 answer
298 views

Dynamic list using ternary if are not accepted by apex

Considering the code snippet: .. List<SObject> lstSObject = sentence == true ? List<typeA__c>() : List<typeB__c>(); Salesforce doesn't explain much as this operator should be ...
Carlos's user avatar
  • 115
1 vote
1 answer
207 views

struggling with getSObject / get syntax

Given the following output for JSON.serializePretty(record) : { "attributes" : { "type" : "Work_Order_Product__c", "url" : "/services/data/v54.0/...
Pete's user avatar
  • 91
1 vote
0 answers
237 views

NavigationLinkSet can't be reach from LWC component

When I am using NavigationLinkSet object in my apex class, and importing any other method from that class in my LWC component - I've got an error: 'Error:(1, 1) FIELD_INTEGRITY_EXCEPTION - Invalid ...
Rafał Fornalczyk's user avatar
-3 votes
1 answer
854 views

Why I am getting error : A non foreign key field cannot be referenced in a path expression: AccountId?

I want to set the Description field on Contact object same as the Industry field on the Account object. But when I am executing the below code I am getting error A non foreign key field cannot be ...
Virat's user avatar
  • 11
3 votes
1 answer
113 views

Getting a formula validation error, can anybody spot where I am off?

IF ( AND ( ts2__Job__c.Days_Search_Open__c >= 0, ts2__Job__c.Days_Search_Open__c <= 4 ), "0 - 4", IF ( AND ( ts2__Job__c....
jdellamag's user avatar
-3 votes
2 answers
813 views

Missing return statement required return type: Integer Apex

When I'm trying to delete some records and get the count of number of records deleted, I'm facing below error: Missing return statement required return type: Integer public static integer ...
salesforce learner's user avatar
-2 votes
1 answer
2k views

Method does not exist or incorrect signature...?

I'm trying to deploy/validate a class but getting this error, even though the class is working in the sandbox. Method does not exist or incorrect signature void buildHTTPRequest(String,String,String,...
Zoom_v's user avatar
  • 3,894
0 votes
1 answer
2k views

Salesforce- Apex error Unexpected Token

I am having a hard time writing an Apex script properly to remove all users assigned to a permission set called E2CP Case Feed End User. Here is what my error is (in Copado): ERROR Unexpected token '...
user avatar
1 vote
1 answer
127 views

Error in initializing sObjectField

I am new to Apex coding any help would be greatly appreciated. This is an update trigger and I am trying to check if the hard-coded field lists were updated. However, I am getting an error in the ...
M Dhanapal's user avatar
1 vote
1 answer
1k views

I am getting an error: Incorrect argument type for function 'ISBLANK()'

I am getting a Syntax error for ISBLANK. I am trying to configure an automation that if I have a checked box on the customer page ("SandSafe" is the check box name) then when users create ...
Aaron Kelver's user avatar
1 vote
1 answer
1k views

Recieving error "Unexpected token '<'." while defining a list in anon apex

The following code returns the error: List<ContentDocumentLink> docLinks = [SELECT ContentDocumentId FROM ContentDocumentLink where LinkedEntityId in ( SELECT Id FROM Case ) and LinkedEntity....
Adam Carr's user avatar
2 votes
1 answer
90 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 ...
Mohamed Houssein Douici's user avatar
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
0 votes
1 answer
995 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....
Sagnik's user avatar
  • 615
0 votes
2 answers
4k 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 ...
skycafe's user avatar
  • 397
7 votes
1 answer
1k 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 ...
DavidSchach's user avatar
  • 5,926
1 vote
2 answers
78 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 ...
Alexis Frisch's user avatar
0 votes
1 answer
226 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="...
Lawrence Liu's user avatar
4 votes
2 answers
5k 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:...
sskular's user avatar
  • 583
0 votes
2 answers
590 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
-1 votes
1 answer
300 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....
sfdcDevloper's user avatar
0 votes
1 answer
767 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) ...
SFDC_Beginner's user avatar
1 vote
1 answer
1k 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 ...
Anonymous123's user avatar
0 votes
1 answer
24 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 = '...
Sharky's user avatar
  • 35
1 vote
1 answer
79 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 ...
Martin Van Dyke's user avatar
1 vote
1 answer
4k 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',...
Chuck's user avatar
  • 11
0 votes
1 answer
109 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:...
Xperez's user avatar
  • 31

1
2 3 4 5 6