Questions tagged [syntax]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
1answer
28 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 ...
2
votes
2answers
204 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....
1
vote
2answers
178 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
24 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 ...
0
votes
1answer
41 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....
5
votes
2answers
157 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
397 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(‘/...
0
votes
1answer
18 views

Variable add on a Javascript controller inside -> component.find(' variable ') markup

I want to add a variable like this. Day value is an Integer var day = component.find('days').get('v.value'); var date1 = component.find('HDate'+day+'__c').get('v.value'); But it returns an error at ...
0
votes
1answer
68 views

Pass a List with a custom object type as a parameter

I am trying to increase my code coverage, I have only provided parts of my code that I am trying to cover. I have to create a List to be able to pass over my values into the method. My Errors I have ...
0
votes
1answer
1k views

Process builder check for specific user

I want my process builder conditions to update for all users except for one particular user. There is not a User option, only Owner and Profile. But the Owner of an object does not mean another user ...
0
votes
1answer
86 views

Syntax error for validation rule

I can not find the Syntax error. Extra ',' AND( OR(ISPICKVAL( StageName , "1 - Prospect"), ISPICKVAL( StageName , "2 - Strategy/Proposal Generation"), ISPICKVAL( StageName , "3 - Proposal ...
0
votes
2answers
52 views

Missing ')' in validation rule

Hi the title says it all, no clue why I am getting the error: Syntax error. Missing ')' AND( OR( ISPICKVAL( StageName , "1 - Prospect"), ISPICKVAL( StageName , "2 - Strategy/Proposal ...
3
votes
2answers
987 views

How to Pass in an Array of Strings in a Method Parameter in a Test Class

I'm writing a test class right now, and I'm calling a method in the class that I am wanting to test. The method in the main class that I'm wanting to test is called getTruckerAvailability(). Here is ...
2
votes
2answers
52 views

Compile errors on Apex scripts that used to work fine

I have a few simple (and a bit hacky) apex scripts that i use to count /clean up duplicate leads. I haven't used them or my dev environment in about a year, and trying to execute them now triggers ...
10
votes
2answers
1k views

Unfamiliar Syntax

I came across the following code online: @future(callout=true) public static void runWarehouseEquipmentSync(){ Http http = new Http(); HttpRequest request = new HttpRequest(); request....
-4
votes
1answer
306 views

Help correct - Incorrect syntax near the keyword 'FULL' [closed]

SELECT s.SubscriberKey, ss.EmailAddress, MIN(s.EventDate) as 'FirstClickDate', o.Client ID, o.Account Email, o.Client Name, o.FULL CUSTOMER ID FROM _Click s JOIN _job j ON j.JobID = s.JobID ...
1
vote
1answer
44 views

Apex/Java Syntax unclear

I don't understand the syntax on the third and fourth row: private void fsRespEmail(List < EmailMessage > newEmailList) { for (Integer i = 0; i < newEmailList.size(); i++) { ...
1
vote
1answer
835 views

Process Builder missing equals sign?

In Process Builder, I am writing a formula for a field value. I would like it to look at a newly created attendee record's preferred email field, see if the contents of that field match the email ...
4
votes
2answers
274 views

Rollback Block?

I am curious what kind of syntax is Apex method System.runAs(){ } where in curly brackets I can run my code which will be executed as passed user. I would like to write my own method with that syntax ...
0
votes
1answer
55 views

Syntax Error while creating a Validation Rule to not allow user to save if field doesn't equal 0% or 100%

I have a section in Opportunities called Pacing and in this section there is a percentage field called Pacing Total. I need to create a Validation rule for this field so that if it doesn't equal 0 OR ...
0
votes
2answers
433 views

IF THEN Statement in VisualForce Email Template

I am trying to create an If statement that will output the date of TimeclockStartDate__c if it has a value and to not output anything if the field is left bank. I am getting an error: "Syntax Error" ...
0
votes
0answers
51 views

Advice on Red Curly Brackets [duplicate]

Does anyone have any advice on debugging someone else's code that has a number of red curly brackets? The code works so it's just me trying to clean it up. They are no longer with the company so I can'...
0
votes
1answer
223 views

How to use Custom Labels inside of an expression on a custom button?

So I'll try to keep this short and simple. I have a client who wants to use Custom Labels in their buttons so the average user can duplicate and re-use them. One such label is simply the API name of ...
0
votes
2answers
307 views

Uppercase validation rule

I have a text field, NAV_Customer_ID, that is been active in our org for years now. I am trying to put in a validation rule that this now has to be in all caps, but I am getting an error message on ...
2
votes
1answer
268 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'); ...
0
votes
2answers
2k views

SFMC query syntax

Greeting All, New to the SFMC application and have been assigned as the new admin. In some of the queries I am having difficulty understanding the purpose of the syntax and I am hoping someone here ...
1
vote
1answer
548 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'...
1
vote
2answers
72 views

Difference between declaring a List statement

I am curious to know the difference between these two List statements one using curly braces and other one parenthesis. Any thoughts please. Thanks. List<BPSyncConfiguration__c> bps = new List&...
1
vote
2answers
34 views

can't able to find Error: Syntax error below code

IF ( ISNEW() Garage__r.Total_inventory__c < Unit_Solds__c, IF (Unit_Solds__c< PRIORVALUE(Unit_Solds__c),false, Garage__r.Total_inventory__c<(Unit_Solds__c-PRIORVALUE(Unit_Solds__c))))
7
votes
1answer
145 views

Got syntax error in an Apex class but compiled successfully. Any thoughts please?

In eclipse one of my Apex class showing syntax error on a particular line of code. But it compiled successfully without any issues. Any thoughts on why i am getting this error? Please see the error ...
0
votes
1answer
388 views

PRIORVALUE func in WFR

I'm trying to use PRIORVALUE in a workflow where the Evaluation Criteria is: Evaluate the rule when a record is created, and any time it’s edited to subsequently meet criteria. My workflow should be ...
1
vote
1answer
1k views

Custom Button with Conditional URL Syntax

After looking at the documentation here for custom buttons using conditional logic, I'm still getting a syntax error for button. I believe it has something to do with attempting to append the URL with ...
1
vote
2answers
294 views

Salesforce Class/Method “with sharing” documentation clarification

I'm going to take the dev 501 exam in a couple of weeks but I'm having trouble understanding something that I am seeing in videos Apex -> Introduction to Apex slides. In the Class Syntax: Sharing ...
7
votes
2answers
2k 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 ...
7
votes
1answer
212 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, ...