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

How to insert data into a custom object with lookup field from apex controller

I have a custom object MyCustomObj__c which has a field called "ContactData". I am trying to insert a record into the custom object with the following apex method. It gives an error: Invalid ID The value Hari already exists in the Contact…
Hari Das
  • 10,145
  • 7
  • 62
  • 59
4
votes
2 answers

Custom Exception Message in apex Salesforce

I want to create a custom exception. In this exception I want to make a constructor which take one string arguments and append in getMessage .How to accomplish this. public class TimelineException extends Exception{ private String message; …
mathlearner
  • 7,509
  • 31
  • 126
  • 189
3
votes
0 answers

Configuring Salesforce LWC Local Dev Server on MacOS / Chrome - 500 Error When Calling Apex with Wire

I'm working on a LWC (lightning web component), and have been using the Salesforce Local Development Server successfully, until the point where I use a wire call to invoke the Apex function. I am getting a server 500 error, and it saying that the…
Brendan McDonald
  • 313
  • 3
  • 13
3
votes
1 answer

PLSQL works not correct in ajax callback

I have following oracle apex ajax callback process: DECLARE inspection_id number; inner_id number; BEGIN inspection_id := apex_application.g_x01; inner_id := apex_application.g_x02; …
Filip Degenhart
  • 631
  • 4
  • 19
3
votes
2 answers

(ApexCharts) How can I make the pie chart the same size?

My Problem : Chart size is fixed including legends. I want to fixed pie chart size except legends. How can I make the pie chart the same size? This is my code. Help me plz var options = { series: [25, 15, 44], chart: { …
jwjung
  • 31
  • 2
3
votes
1 answer

How to connect and Retrieve Snowflake(database) via RestAPi from Salesforce

We need to connect to the Snowflake database and get the results when executing LWC component(APEX/JSON). In that LWC when users search some Accounts name, then need to retrieve the Accounts list from the Snowflake database as well if exits. So is…
lochana
  • 121
  • 3
  • 15
3
votes
6 answers

Type 'undefined' is not assignable to type 'ApexAxisChartSeries | ApexNonAxisChartSeries'

I have used this code in ts export type pieChartOptionss = { series?: ApexNonAxisChartSeries | ''; chart?: ApexChart | ''; legend?: ApexLegend | ''; dataLabels?: ApexDataLabels | ''; responsive?: ApexResponsive[] | ''; labels?: any |…
A. B
  • 327
  • 4
  • 14
  • 33
3
votes
1 answer

How can i use select * in SOQL query in Salesforce?

I am trying to run a select in Salesforce as follows: SELECT [Account].* FROM [Account] WHERE [Account].Id IN ('123456789012345678') but gives an error: "Unknown error parsing query" How can i do this selection ?
Abbey
  • 153
  • 2
  • 11
3
votes
2 answers

Is there a way to pass multiple (and different) parameters to an Apex Controller class from JS in Lightning Web Components (LWC)?

I'm currently stuck at a problem and was hoping someone here could help me. I also certainly hope this is the right place to ask it. I'm trying to create a custom Invoice record with its corresponding Invoice Line records upon firing an event. I…
Sid Fortunato
  • 33
  • 1
  • 1
  • 7
3
votes
1 answer

Why does huggingface bert pooler hack make mixed precission training stable?

Huggigface BERT implementation has a hack to remove the pooler from optimizer. https://github.com/huggingface/transformers/blob/b832d5bb8a6dfc5965015b828e577677eace601e/examples/run_squad.py#L927 # hack to remove pooler, which is not used # thus it…
3
votes
0 answers

Is it possible to open Outlook Mail and import HTML text from Salesforce object field to Mail body with apex code?

I am a beginner at Salesforce field and APEX programming language. I would like to know is it possible to open OUTLOOK and import HTML BODY text (over +20000 characters) from certain SALESFORCE object's field and import to Outlook email body using…
3
votes
1 answer

How authentication is handled for Twilio SMS StatusCallback URL

I have started using Twilio Programmable SMS API to send messages through Twilio. As we all know, a message status can be queued, failed or sent, delivered or undelivered, and it changes over a period of time. As per the documentation, the API has…
Azeez
  • 318
  • 3
  • 14
3
votes
1 answer

Dynamic change of field value using sObject

I'm trying to use sObject to dynamically change Name field objects across while organization. I've tried using SomeId.getSObjectType().newSObject(SomeId) to create the sObject, but when I try to change the Name field I have error Variable does…
Brane
  • 3,257
  • 2
  • 42
  • 53
3
votes
2 answers

Why the property is not setting in Salesforce Apex?

I have a VisualForce page testPage {!myString}, {!myString1}, {!myString2}, {!Mystring3}, {!myString} And the controller is public class testController { public string myString…
Noor A Shuvo
  • 2,639
  • 3
  • 23
  • 48
3
votes
1 answer

Has anyone found a way to supress a false positive warning in APEX code for PMD?

When looking at PMD documentation it appears that for apex code there is no way to do a suppression for a single line of code. I have a lot of false positives that have been making builds fail so I need to find away around this besides for…
Sammy
  • 33
  • 3