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

VS Code APEX CLI test method debugging

I am using the attached test class which contains one method (testManualApprovalProcessManuallyApproved) to debug my code. I have turned on/off the apex debugger then got the debug logs and run the replay debugger to check my code, I have put a lot…
Sam
  • 487
  • 4
  • 12
  • 31
4
votes
1 answer

Accessing Google Sheets API via Service Account Key

I am working on Google Sheets <-> Salesforce integration and developing it in Salesforce programming language - Apex on Force.com platform. Currently I am attempting to connect to Google Sheets API. I am using Service Account Key, so Salesforce can…
4
votes
0 answers

how to add button to lightning list view

is it possible to add new action along with edit/delete values in drop down near every object(image below) I followed this topic topick the only decision I have come up with is like in this article click here since winter 17 relese we can add…
ketchyn
  • 504
  • 3
  • 6
  • 16
4
votes
4 answers

Can't see system.debug ouput in logs when using apex batchable code

I execute the following in the anonymous execution: Database.executeBatch(new TransferACDCAccountOppOwnerBatch(), 200); The class is below. It uses Batchable interface. I put in a bunch of debug statements but don't see anything in the logs in the…
4
votes
2 answers

Get size of Blob / String in bytes in apex ?

I wants to know what the size of string/blob in apex. What i found is just size() method, which return the number of characters in string/blob. What the size of single character in Salesforce ? Or there is any way to know the size in bytes…
hcohen
  • 325
  • 6
  • 17
4
votes
0 answers

OAuth 1.0 A Invalid Signature when requesting request token (SalesForce/JIRA Integration)

I've been trying my darndest to avoid asking a question. I'm recieving an invalid signature error when trying to request a request token from JIRA from within Salesforce. The response I'm getting is: 08:15:24:201 USER_DEBUG [30]|DEBUG| …
gNerb
  • 867
  • 2
  • 12
  • 28
4
votes
2 answers

How can Apex update Custom Metadata Types records/Literals values?

I have a custom metadata type "Project Literals" which have records that contain custom field ids example: Label: StatusFieldId Name: StatusFieldId Id Field: 00N8E000000XYuM Using DML statements give me an error "Id Field is not writable" Is there a…
James
  • 59
  • 2
  • 6
4
votes
1 answer

Looping through Salesforce Accounts

I am a new developer and I have a task I need to complete and I am totally clueless on how to tackle. This is an angular calendar App. And my task in this big project is to simply make it function so that when a user types a field in the search…
4
votes
0 answers

How to specify Server side encryption with S3 pre signed urls?

This is a S3 issue so I am posting this here and not in the Salesforce stackexchange. Basically my Salesforce code generates pre-signed urls for S3. These are consumed by the front end to upload and download files. This is working perfectly. Now we…
Richard N
  • 895
  • 9
  • 19
  • 36
4
votes
1 answer

how to Write a boolean parameter in multiPart/form-data in Http request

Content-Type: multipart/form-data; In MultiPart/form data I have something like "String header = '--'+boundary+'\nContent-Disposition: form-data; name="file"; filename="'+file.name+'";\nContent-Type: application/octet-stream';" --AaB03x I need to…
4
votes
2 answers

Need Help to Overcome Apex CPU time limit exceeded Error

I am working on a module which will de-duplicate contact records on insert/update but I am hitting into Apex CPU time limit exceeded error. I understand that to overcome it we need to optimize code a little but in the following code block there…
Shahid Ali
  • 63
  • 2
  • 9
4
votes
2 answers

How to intercept the SOAP Request/Response Made from Salesforce or received in Salesforce?

I am working a salesforce integration project. We are making n number of web service calls to third party services. Now I have to implement a logger , where I need to store the soap request and response in xml format. Most preferable is the same…
Smruti R Tripathy
  • 789
  • 1
  • 10
  • 15
4
votes
2 answers

How to get namespace of all packages installed in a salesforce organization?

I want to fetch the namespace prefix of all packages installed in a salesforce organization.How can I do that?
Manuj
  • 253
  • 1
  • 7
  • 14
4
votes
2 answers

Salesforce's APEX language specification

I'd like to find out exact APEX language specification (with all that grammars, etc.) but I've spent half a day and ended with almost nothing. I know that APEX is Java-based language, but compiling it's spec on my own from Java spec and exclusively…
Bickus
  • 43
  • 4
4
votes
2 answers

Apex - Subtract minutes from DateTime Object

I'd like to subtract 5 minutes from DateTime.now() May I know how I can do this? Thanks!
Mohamed Farag
  • 139
  • 1
  • 5
  • 15