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
20
votes
6 answers

`UnencryptedCookieSessionFactoryConfig` error when importing Apex

I'm trying to use Apex and whenever I try to import it (or anything involving it) I get the following traceback: Traceback (most recent call last): File "", line 1, in File…
Sean
  • 2,890
  • 8
  • 36
  • 78
14
votes
4 answers

How to get Proxy object content?

I am working with lightning web component and apex class. This is new for me. I am trying to get the content of a Proxy object generated by an Apex class. But when I console log it I have a result like this : Proxy { : {}, : {…}…
13
votes
3 answers

GitHub Pages: setting up custom domain

I've got an organization page set up and running in GitHub and things seem to be working...but I'm a little confused. I'd like to actually understand the process since the GitHub Help article refers to taking advantage of their CDN and DoS services,…
cmegown
  • 401
  • 5
  • 19
13
votes
6 answers

Is the SWITCH and CASE statement supported in APEX in Salesforce?

Instead of this basic structure with IF / THEN / ELSEIF / ELSE int month = 8; String monthString; if (month == 1) { monthString = "January"; } else if (month == 2) { monthString = "February"; } ... // and so on it would be nice to have …
David W Grigsby
  • 1,554
  • 1
  • 13
  • 23
12
votes
2 answers

How to return only value in pie on apexcharts.js won't convert percent

I'm developing a website for a society and I am using apexCharts.js, I want to show a simple pie chart but when I display this, the value on dataLabel is a percent. I don't want to convert them into values, of course the true value is display when…
Barth.M
  • 129
  • 1
  • 1
  • 7
7
votes
1 answer

After Update Trigger pending Approval request OriginalActorId

The trigger below is built to pull the most recent "assigned to" user (or OriginalActorId) from the approval process list, the Approval_started__c field is checked as an initial submission action from a specific approval process. The issue I have is…
Sam
  • 487
  • 4
  • 12
  • 31
6
votes
2 answers

Can we Cast SObject dynamically in Salesforce(apex)?

Is it possible to Cast SObject dynamically? Example : I know we can do this : (Account) Sobject But I want to do this as the return type of sObject changes based on certain parameters. (Dynamically Passing the Name) SObject Any Kind of way around…
AtNeo
  • 61
  • 1
  • 2
5
votes
1 answer

Is GradScaler necessary with Mixed precision training with pytorch?

So going the AMP: Automatic Mixed Precision Training tutorial for Normal networks, I found out that there are two versions, Automatic and GradScaler. I just want to know if it's advisable / necessary to use the GradScaler with the training becayse…
Deshwal
  • 3,436
  • 4
  • 35
  • 94
5
votes
3 answers

How do I migrate Ada code from a Sun Solaris 10 to 11 using an APEX compiler

I have zero experience with Ada so please bear with me. We inherited a 20 year old system written in the late 90's. The compiled code is currently running on a Sun Solaris 10 system. No one has touched the code in years. The compiler for Ada is…
Sheldon
  • 51
  • 3
5
votes
1 answer

Terraform: Log driver awslogs option 'awslogs-group' contains invalid characters

I have the following config for ECS using terraform and apex. resource "aws_ecs_task_definition" "task" { ... container_definitions = <
shwz
  • 426
  • 1
  • 6
  • 22
5
votes
2 answers

Is there a way to serialize/deserialize Apex object properties with a different name?

I'm part of a team building an API wrapper in Apex. Our service responses use snake case, but we wanted to follow style conventions and use camel case for our Apex variables. If the names don't match, however, the properties won't get set correctly…
Logan Patiño
  • 91
  • 1
  • 10
5
votes
0 answers

Custom bullseye chart for Salesforce chart.js

I would like to create a layer of overlapping circles. Something like the following https://i.stack.imgur.com/pzeBH.jpg I guess it would be similar to a bullseye chart. I would imagine it needs to be built with chart.js and tied to Salesforce Apex…
a415
  • 359
  • 1
  • 6
  • 23
5
votes
1 answer

Test.loadData with Custom sObject Throws Exception

I am loading a CSV file via Static Resourced to test my APEX code. I am using the following code in my test: List territoryData = Test.loadData(Territory_Zip_Code__c.sObjectType, TERRITORY_ZIP_CODES_STATIC_RESOURCE_NAME); The…
Swisher Sweet
  • 769
  • 11
  • 33
5
votes
2 answers

How can I get subList of a List in Apex Salesforce?

I have got a list of SObjects having N number of items/sObjects SObject[] sList = [sobject1, sboject2, sboject3, ........ , sobjectN] How can I get just 10 items from the begining of the list Thanks in advance!
user3534513
  • 85
  • 1
  • 2
  • 5
4
votes
1 answer

FIELD_CUSTOM_VALIDATION_EXCEPTION

I am writing a test class for a trigger. But i am not able to run it properly it only contain 68%. The error is System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, This part is not…
Anu
  • 194
  • 1
  • 2
  • 11
1
2 3
99 100