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
0
votes
1 answer

DML statement to add multiple accounts in single step

I want to add multiple accounts to the salesforce object from the anonymous window. I know how to do that using the below code Account acc = new Account(Name='account1'); List accToAdd = new List(); accToAdd.add(acc); insert…
mdanish9
  • 3
  • 3
0
votes
1 answer

apex: TypeError: Class advice impossible in Python3

i installed apex: pip uninstall apex My configurations are as follows: torch version 1.7.1 python version 3.7 cuda 11.0 I came across this error after running import pytorch: TypeError: Class advice impossible in Python3. Use the @implementer…
Sajjad Aemmi
  • 2,120
  • 3
  • 13
  • 25
0
votes
1 answer

How to create customer card in Square using Apex in salesforce?

We had a requirement to create customers and save their credit card information in Square using salesforce and them we had to charge payments of customer later through apex code(in salesforce). So for this, we read and understand the Square API doc…
Devid
  • 74
  • 1
  • 2
  • 8
0
votes
1 answer

How to solve "Java 8 or more recent is required to run. Please download and install a recent Java runtime." in VSCode?

I'm always getting this error message in VSCode from this XML extension The thing is that I've already installed JRE8, JDK8 and JDK11 from Oracle. When I type java -version in CMD I get this How can this one be solved out? P.S. VSCode version is the…
denis1532
  • 1
  • 1
0
votes
1 answer

How to extract a particular URL from a Json response

I am sending a API request to a third party system called quip and I am trying to extract a particular URL from the JSON response that I am receiving on that call, through apex code. The JSON response that I received is as below. { "thread": { …
Akshay Vasu
  • 445
  • 1
  • 12
  • 33
0
votes
0 answers

Send Slack Notification to multiple channels with an Apex Class in Salesforce

I have an apex class allowing me to send slack notification to a channel. But I would like to be able to send slack notifications to multiple slack channels. Does anyone has an answer or is able to point me the a documentation to achieve…
0
votes
0 answers

Case Milestones not created when testing apex class

Recently I stumbled upon problem getting code coverage for Apex code that evaluates case milestones by their target date values. When trying to create case in test class it does not create case milestone for it after insert although all the criteria…
0
votes
1 answer

JSON to be passed from Apex to Lightning Component and display it in a data table

Below is my JSON, out of which I need ID, StartTime,DurationMilliseconds,LogLength. Below is the code that I tried but it is returning only all the values in a single line.Any help would be apreciated: { "size":6, "totalSize":6, …
0
votes
1 answer

Get list of parent records from multilevel SOQL query

I'm trying to combine 3 separate SOQL queries into one, but still end up with 3 separate lists for ease of use and readability later. List objectList = [SELECT Name, Id, Parent_Object__r.Name, Parent_Object__r.Id, …
m.lp.ql.m
  • 5
  • 3
0
votes
1 answer

How to Update DocuSign Envelope Document

I have DocuSign set which sends PDF to docuSign for Signing. My requirement is to Update the Document of a particular envelop so that it will save cost of generating new envelope every time user make changes to actual document that has to be…
0
votes
1 answer

When to cast a variable

Casting in Apex seems like Black Magic to me. I don't get when should we make an explicit cast, and when it can be implicit. Like: Recipe.apxc public virtual class Recipe{ public string nome; protected string instructions; private String…
0
votes
1 answer

To Reset Field using Visualforce page and apex

Hi i am new to visual force i wanted to learn how to reset the field in VisualForce Page
0
votes
1 answer

How can I fix, ORA-02291: integrity constant violated - parent key not found

I'm using apex oracle, and I keep getting this violation. If anyone could explain to me why, I would be very grateful. my code: CREATE TABLE books ( book_id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, title VARCHAR(255)…
0
votes
1 answer

Button used for navigation on Visualforce Page is not working

we have a button on visualforce page which has been called from community portal which is used to navigate from one visualforce page to other visualforce page with the help of the page reference class. The button is not responding.
0
votes
1 answer

Trigger is firing two times, but first run is empty?

The following Trigger is firing twice: trigger AccountTrigger on Account ( before insert, after insert, before update, after update, before delete, after delete) { AccountTriggerHandler handle = new AccountTriggerHandler(trigger.new,…
coffee_bear
  • 31
  • 1
  • 8