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
3
votes
0 answers

How to use attribute in custom settings?

How to use "accept" attribute in custom settings? Give me some idea, this is my code:
3
votes
1 answer

Visualforce email template unit test

I have a trigger that sends an email using a VF template. I'm trying to write a unit test for that code, but keep running into a problem when trying to create the test data. Here is my test method: static TestMethod void testQuestionAttachment(){ …
AvailableName
  • 666
  • 4
  • 13
  • 24
3
votes
0 answers

How to implement REST with APEX call in native Android apps?

I am trying to execute the apex request using http method GET and passing some parameters and getting response as "OK" in result from backend. On success, I get the mail of an document in pdf format on my email address. But the problem is that the…
Ritu Nagpal
  • 161
  • 1
  • 11
3
votes
1 answer

Read data from Excel file using Apex in Salesforce

I have a requirement where we need to parse the excel file and insert the data in one of the object using apex. This excel file contains multiple sheets. We need to read the data from multiple sheets (as of now one sheet is also fine) and upload the…
bhaskar b
  • 51
  • 2
  • 5
3
votes
1 answer

S3/Cloudfront: how to list a folder's contents in a bucket

I've written a method that signs URLs to read an S3 bucket that is accessed through Cloudfront: private HTTPResponse signURL(String endpoint) { String keyPairId = 'keyPairId'; String secret = 'SOME_SECRET'; String method = 'GET'; …
t56k
  • 6,769
  • 9
  • 52
  • 115
3
votes
4 answers

Unable to use "Query Editor" in developer console

While trying to use the query editor in developer console. "SELECT ID FROM ACCOUNT" It throws an erorr saying "This session is not valid for use with the REST API". Any idea what excatly tthe issue here. Earlier it workerd fine. The same problem…
Abhik Dey
  • 151
  • 1
  • 5
3
votes
0 answers

Getting heap size error while deserializing json respone in apex

I am using third party service to get data using rest API. But sometimes it return more than 6 MB data. They don't have API to provide data in chunks. I am already using future method to increase heap size limit to 12 MB. With below code, I am…
3
votes
2 answers

Pass a variable into a select query in SOQL

I am running a Python script that uses the simple-salesforce package to query all data in my Salesforce account. For context, the script reads a dictionary stored in a CSV file and stores a specific value, which is a string, in a variable (see…
Philosopher
  • 45
  • 1
  • 4
3
votes
1 answer

Updating the data field tag in Docusign from Salesforce data

I am using Docusign API Integration to Salesforce. I have a requirement to update the data field tag in a document by calling the Docusign API from Salesforce after it has been sent for signature. Let's say the routing order of signers are from…
sam_s
  • 197
  • 3
  • 12
3
votes
1 answer

How to generate a csv file from field values of an apex page when clicking a command button in visualforce?

I'm working on a visualforce project that requires generating csv file from a group of field values. I'm using the following code to generate csv, I'm supposed to click on a command button to generate the file but the problem is that when i click…
sh ze
  • 169
  • 2
  • 5
  • 14
3
votes
2 answers

SALESFORCE1(AURA PLATFORM): How to pass values from a client-side-code(JavaScript code) to server-side-code(APEX)?

I am working on Salesforce1 (Aura platform). I am trying to pass values from client-side (javascript) to server-side controller(Apex-code). I tried by using setParams(); in JavaScript and @key annotation in Apex but @key is not supported in…
3
votes
1 answer

Multi Level Nested JSON Parsing with Apex Salesforce

Can I parse Multi-Level nested JSON structure in APEX Salesforce, like we do in Java with GSON and Jackson libraries? { "key1":"value1", "key2":{ "key3":"value3", "key4":{ "key5":"value5" } …
Master
  • 2,945
  • 5
  • 34
  • 65
3
votes
1 answer

Session id issue: Different id for vf and developer console

I am facing following issue: On load of visualforce page I am making http callout to internal salesforce page but here I facing authentication problem. If I am running same http callout from developer console then I am getting successful response…
user3682511
  • 45
  • 1
  • 7
3
votes
1 answer

Mark specific records for update in Visualforce table

I created a search page that returns sets records using a custom controller and a Visualforce page. Users can update specific fields on individual records. I want to have the ability to save all the changed records at once, but the action command…
NebX
  • 33
  • 2
3
votes
2 answers

Salesforce UserInfo session type in APEX

I would like to know if there is a way to find out in APEX when an particular user is logged in directly or via the "Login As" feature from the organization's user list. The UserInfo class doesn't seem to provide any methods for this purpose and i…
PeterB
  • 31
  • 3