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

How To Report Records in Batchable Salesforce apex code such that it should report where the Level2 or Level3 are NULL

Here is my current Batchable apex code,currently this batch job copies the data over from the new custom object ERT_Case_Type__c to the old custom object Case_Type__c But problem is this job not copying when the Level2 or Level3 are not there. I…
Carolyn Cordeiro
  • 1,525
  • 3
  • 11
  • 26
0
votes
1 answer

How to send api request from test class to Main class in salesforce?

Class : @RestResource(urlMapping='/api/fetch_status/*') global class RestDemo{ @HttpGet global static Account getResult(){ Account account; String accountId = ''; RestRequest restReq = RestContext.request; …
0
votes
3 answers

Docusign Template is no merging with APEX code

I send in the opportunity id into mySourceId into the routine and run through what should be the standard Docusign APEX API routines. We have a button that completes this merge using the standard Docusign routines, but are trying to get around all…
0
votes
0 answers

Exact Online Refresh-token Header generates Java Exception (Exact Online, OAuth)

I'm sending an OAuth callout to https://start.exactonline.nl/api/oauth2/token When the Refresh Token is expired Exact Online returns an invalid messages. The response that is returned contains 2 WWW-Authentication headers (where 1 is blank). Java…
0
votes
1 answer

Validate a record before against the records in another Object before saving - Salesforce

I have a requirement where in Opportunity record detail page has Customer, Agency, Sales Owner, Account Manager fields and there is another custom object name Data combine that stores the data of all the records with all the possible combinations…
Akshay Vasu
  • 445
  • 1
  • 12
  • 33
0
votes
0 answers

Cross fromula fields from Opportunity to Quote with custom fields

I'm trying to access some custom fields in the Quote object from Opportunity Object. I tried to use cross formula fields to access the fields via SyncedQuote, but for some reason not all my custom fields from the Quote Object appear in the dropdown…
Dennis1995
  • 55
  • 2
  • 8
0
votes
1 answer

VS Code Salesforce import picklist value [isActive Tag missing]

When importing a picklist, VS Code offers only the Active picklist value, and the tag isActive does not come in the xml import file, how can we make sure we get all active and inactive picklist values here is what I get and I want to have the tag…
Sam
  • 487
  • 4
  • 12
  • 31
0
votes
1 answer

Salesforce first error: INVALID_CROSS_REFERENCE_KEY, Entity not available

When I am trying to run my test class I am getting the below error. System.DmlException: Update failed. First exception on row 0 with id 8023B000000ekyaQAA; first error: INVALID_CROSS_REFERENCE_KEY, Entity not available: [PricebookEntryId] Also in…
Akshay Vasu
  • 445
  • 1
  • 12
  • 33
0
votes
1 answer

Salesforce is not able to get docusign authentication failure event

I have enabled recipient failure event in triggered event in docusign.but still i didn't receive any reference in Salesforce after authentication failure at recipient end
0
votes
1 answer

How to create CURL command for POST method for Salesforce Account Object using Salesforce Tooling API On Postman?

Hi i am able to get OAUTH token using below article,but i need to send POST method for Accounts using Salesforce Tooling API On Postman i am using v45.0 version of salesforce,can some one tell me what should be below things:- 1)Rest end point for…
Carolyn Cordeiro
  • 1,525
  • 3
  • 11
  • 26
0
votes
0 answers

how to download attachments from opportunity in salesforce using rest api

I'm trying to get the attachments that are placed inside a opportunity but I can't doing simple way. I'm checking the api services/data/v20.0/sobjects/Opportunity/{id} but parent_id is not returning or something that relates to attachments. enter…
Gustavo
  • 7
  • 1
0
votes
1 answer

SObject Relationship: Field is not writeable: Child__r

I am writing a test class for my code and am running into an issue that is annoying me. So I was wondering if there is any way to do this. I have an Apex class with some functionality that I am Unit Testing, let's assume it is defined something like…
xouns
  • 1
  • 2
  • 2
0
votes
1 answer

Salesforce Field value not visible on web page

I have a field Expiration Date in an Object, also I have an actual Expiration Date(value) in it for an account for which I'd be using the field, also when I do have the field added on the page layout but, when I run the page the value of the field…
0
votes
1 answer

In Salesforce, what is the easiest way to programmatically change a Contact Owner AND notify that User (via email) of the change?

When manually changing Contact Owners in Salesforce, there is a checkbox that says "Send Notification Email." Is there a way to programmatically check that box when updating contacts using APEX?
Joey Dias
  • 7
  • 4
0
votes
0 answers

Compress string in Apex and decompress it it python

In Salesforce we fire a platform event and add a payload to a field Payload__c (LongText)to this platform event. We created a streaming client in python which subscribes to this platform event and consumes the payload. Because sometimes the payload…
Marc
  • 141
  • 1
  • 7