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

Error java.lang.IllegalArgumentException: invalid start or end

I am trying to test the Rest API Callout from Salesforce that has OAuth authentication through the Apex code and running in to the below error Line: 12, Column: 1 System.UnexpectedException: java.lang.IllegalArgumentException: invalid start or…
trx
  • 2,077
  • 9
  • 48
  • 97
2
votes
2 answers

How to close a modal in slack?

I am using apex to invoke the modal in slack and a bit confused on how to use the response_action for closing it. { "response_action": "clear" } Do I need to make an HTTP request and if yes what will be the endpoint and what will be the structure…
2
votes
5 answers

Salesforce apex code creates duplicates in custom object

I have this apex batch class: The MDU_Squad_Data_min__c custom object below has a lot of duplicate values in the city & province column. With the below code I was able to get rid of duplicates with the help of the contains method to a certain…
Sumchans
  • 3,088
  • 6
  • 32
  • 59
2
votes
2 answers

Safari show Pop-Up on window.open

hope someone can help me with this. The code snippet works fine. The only thing is on an iPad/Safari this code opening new tab runs into the pop-up blocker. If we disable the pop-up blocker (which would be OK) there is still a message showing up…
Mario Z
  • 21
  • 1
  • 2
2
votes
0 answers

Salesforce Change Data Capture on User entity

I've been trying to implement CDC on User entity, to handle "CREATE" event changeType unsuccessfully. I was able to receive "UPDATE" notification, but when I create a User (internal/partner user) nothing happens, there's no new log entry in…
2
votes
2 answers

Consuming a Kafka Topic from Salesforce

We have a microservice architecture and we want to publish events into Kafka topics to then be consumed by Salesforce. What is the best approach to do this ? Is there any example Apex code that do that ? Best Regards.
2
votes
1 answer

I am getting a list view of images instead displaying in grid format

I am new to Salesforce, I am unable to form a grid with images from the URLs that I have given in my apex class using JSON, they are returning a list view instead of resulting side by side. Any help would be appreciated. Component:
user12216307
2
votes
1 answer

Package.xml autorefresh VSCode [Salesforce Metadata API]

Is it possible to have VSCode retrieve and update automatically the package.xml file on a daily basis and bring the latest metadata components to it.
Sam
  • 487
  • 4
  • 12
  • 31
2
votes
0 answers

Overriding the redirect on saving force:createRecord on Salesforce Lightning

I need to override the redirect on save of a force:createRecord lightning component. var eve = $A.get("e.force:createRecord"); eve.setParams({ "entityApiName": "Opportunity", "defaultFieldValues": { "AccountId" : accountId }, …
Val Valino
  • 21
  • 3
2
votes
3 answers

Salesforce: How to get Week Number in a Date field (checking week 53) either using apex code or formula

Need to get the correct week number in a date field. Some date are having 53 weeks (you may refer here: https://www.epochconverter.com/weeks/2026) Apex: Datetime dt = Datetime.newInstanceGmt(2020, 12, 28); //Dec. 28, 2020 Integer week =…
Deks
  • 21
  • 1
  • 3
2
votes
1 answer

not able to pass vuex store data to graph

Currently, I am trying to pass my data from vuex store into my apexcharts graph. However, it does not seem to work? Could anyone advise what I did wrong? I am mainly trying to update this.series and this.chartOptions.labels before the apexchart gets…
ApplePie
  • 1,155
  • 3
  • 12
  • 30
2
votes
1 answer

Failing to 'pip3 install apex' down to failure to build cryptacular (installed)

Problem: pip3 install apex fails because of failure to build cryptacular, errors as below. cryptacular was successfully installed (before attempts of installing apex) using this one-liner: pip3 install -e…
Massyanya
  • 2,844
  • 8
  • 28
  • 37
2
votes
1 answer

PMD Apex Can't find resource for rule on Windows

I'm trying to configure PMD for code analysis. I'm using VS Code, already installed Java 10, downloaded several versions of PMD I've installed the Apex PMD extension for VS Code and configured it as per it's instructions. But keep getting the can't…
Federico Giust
  • 1,803
  • 4
  • 20
  • 45
2
votes
1 answer

How to make my Apex class return or "run" a JSON? using APEX REST

I am using the following code to generate a JSON for a Salesforce custom object called Resource Booking. How can I "run" the file (or call responseJSON) so that when I input the custom URL (in the first comment) it jumps to a page similar to this…
Lester Smith
  • 45
  • 1
  • 5
2
votes
0 answers

Render FileContentResult using javascript

I have an Web API written in Core 2 that returns a FileContentResult. You need to do a GET with an Auth Token in the header for it to work. If you try it with postman, the file renders fine and it also renders well in an MVC View. Now we have an…
Nick
  • 2,877
  • 2
  • 33
  • 62