Questions tagged [apex]

Apex is a strongly typed, OOP language that allows to execute flow and transaction control statements on the Force.com platform server in conjunction with calls to the Force.com​ API. Not to be confused with Oracle Application Express (APEX) - use tag [oracle-apex] for Oracle APEX questions

Apex is a strongly typed, OOP language that allows to execute flow and transaction control statements on the Force.com platform server in conjunction with calls to the Force.com​ API.

There is synonym for this tag - .

Useful Links:

Apex Intro/Quick Start

2528 questions
2
votes
1 answer

How to insert values to a table in APEX, using a PACKAGE?

Right now I'm inserting values to a table, with insert or update values, like this: IF :P903_PYMT_MTH_ID IS NOT NULL THEN INSERT INTO "TABLE_NAME" ( PYMT_MTH_ID, …
José Mora
  • 35
  • 5
2
votes
1 answer

Command 'SFDX: Run Apex Tests' resulted in an error (command 'sfdx.force.apex.test.run' not found)

I am learning Salesforce Apex development by taking a trailhead tutorial. Tutorial: Find and Fix Bugs with Apex Replay Debugger I followed the tutorial along and got the following error when I try to call "SFDX: Run Apex Tests" in Visual Studio…
Xin
  • 737
  • 3
  • 10
  • 27
2
votes
1 answer

Change the text color of a shuttle based on a condition in oracle apex

I have two different tables in oracle apex, the first one is the documentation table which contains KPI's, the second one is the results table which contains all the KPI's results. I have created a shuttle in a page to choose KPI's from…
2
votes
2 answers

How to prevent ssesion from expiring in apex?

how can something be done that does not expire the session in oracle apex? best regards.
2
votes
1 answer

There are two date fields on an Object say Date1 & Date2,Now I want to Write a SOQL Query in SOQL Editor to fetch all the Object records

There are two date fields on an Object say Date1 & Date2, Now I want to Write a SOQL Query in SOQL Editor to fetch all the Object records where Date 2 is Greater than Date 1. how you will do this using SOQL only?
2
votes
3 answers

Documentation in Oracle APEX

I have a very general question and actually not quite sure if it belongs here. But I am asking myself how do developers in practice document pages in oracle apex with all their processes,dynamic actions, computations etc. document since it…
user111
  • 137
  • 1
  • 15
2
votes
1 answer

SOQL Use LIKE with EXPLICIT Collections

This syntax works ok for using like with collection : Set setAccNames = new Set(); setAccNames.add('ABC'); setAccNames.add('XYZ'); setAccNames.add('RST'); List accList = [SELECT Id FROM Account WHERE Name IN…
hcohen
  • 325
  • 6
  • 17
2
votes
2 answers

How can I traverse through multiple related objects based on ID and return some related field?

I'm a little stuck. I am trying to generate a report that determines whether anyone has made a manual change to certain fields within our order framework. I have figured out the proper fields and structures to audit, and even how to make the report,…
2
votes
1 answer

Salesforce LWC - Multiple Apex Callout Imperatively Fails

I am trying to make multiple callout to Apex imperatively from a FOR loop. But strangely, only first 6 transaction are getting successful. Rest all are failing. There is no mention of any such limits of number of callout from LWC to Apex in…
2
votes
2 answers

I sheduled an apex class to run everyday, but nothing happens. Can somebody help me out?

I wrote this APEX class and sheduled it to run every day.I don't get an error message, but unfortunately the class doesn't do anything... Can anybody help me out? global class CustomersDateCheck implements Schedulable { global void…
2
votes
1 answer

C#'s HMAC SHA512 value too short compared to Salesforce's?

Why am I getting a different mac value from Salesforce's Apex vs C#? I have the following C# code to generate a signature: using (var hmacSha512 = System.Security.Cryptography.HMACSHA512.Create()) { byte[] payload =…
ProgrammingLlama
  • 36,677
  • 7
  • 67
  • 86
2
votes
1 answer

Showing a loading indicator while calling Apex in Salesforce LWC

What is the best way to show a loading indicator while retrieving data from Apex in a Lightning Web Component? I have this approach: import { LightningElement, api } from "lwc"; import shouldShowCard from…
Daniel Vu
  • 33
  • 6
2
votes
1 answer

Code Coverage Failure Your code coverage is 72%. You need at least 75% coverage to complete this deployment

I am working on a new project where the client's pre-existing production code has a low coverage of 72% thus not allowing me to deploy any work done in the Sandbox. Error: Code Coverage Failure Your code coverage is 72%. You need at least 75%…
2
votes
2 answers

Split a date into equal intervals based on a given frequency

I'm trying to break a range of dates into equal intervals. Here is the code that I'm using. (Dates are in YYYY-MM-dd format) Integer frequency= 4; Date startDate = '2020-02-27'; Date endDate = '2022-02-26'; String[] startD =…
user3872094
  • 3,269
  • 8
  • 33
  • 71
2
votes
1 answer

Calling methods conditionally from two different classes

I have two classes ExceptionLog and DebugLog. public class ExceptionLog { public static String StackTrace {get; set;} public static String ClassName {get; set;} public static String MethodName {get; set;} public static String LogType…
Noor A Shuvo
  • 2,639
  • 3
  • 23
  • 48