Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [syntax]

The tag has no usage guidance.

0
votes
1answer
12 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
14 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
35 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
502 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
34 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
35 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
568 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
39 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....
-5
votes
1answer
244 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
642 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
266 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
48 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
298 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
39 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
139 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
160 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
227 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
1k 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
398 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
71 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
30 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
123 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
264 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
916 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
277 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
1k 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
193 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, ...