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

Salesforce -Fire apex trigger only after complete data load

So here is the issue We are loading data into a CustomObject__c using DataLoader. Usually the no of records that are passed are 3. Also, if there is any issue with the data passed, they run the dataloader again and pass the corrected data. Now, the…
0
votes
1 answer

Convert PDF to HTML by Javascript

Is there any way to convert PDF to HTML that can be edited?When a user uploads a PDF file, it can be converted into HTML, and some contents in it can be replaced.
One
  • 13
  • 5
0
votes
2 answers

sfdx force:apex:test:run include coverage for only those tests included in the sfdx command

I have an org that has approx 530 test classes .I am currently working on a nodejs project that uses the sfdx commands to run the tests in the org and then generate code coverage report, analyze and classify them so that I can use the classified…
0
votes
2 answers

Trigger to show comma-separated products in the text area custom field whenever the order line item is changed

Trigger to show comma-separated products in the below custom field whenever the order line item is added/updated/deleted. Custom field on Order - xyz(textArea) I am completely new to development and have been trying a lot to write but can't move…
jujitsu
  • 3
  • 3
0
votes
2 answers

Invocablemethod Apex Class Rollup Multiple Currency Fields

I'm writing an invocablemethod batch apex class to rollup multiple currency fields on an "Order Package" object to its parent object of "Order Location". I thought I got everything added properly but it seems to be updating both the…
0
votes
1 answer

Invocablemethod Not Creating Records in Apex Class

I'm pretty new to writing Apex but everything does seem to be running smoothly separately in an executable window when I split apart the class I created below, but when I'm running this from within a flow it doesn't seem to create the records at…
0
votes
1 answer

Apex Test Class for Invocablemethods

I'm brand new to writing apex and especially test classes in apex. I can’t seem to find out how to properly call my class method in my test class it seems like. My test class is definitely not finished but I'm just starting with one of my delete…
0
votes
1 answer

Clone a quote and mantain the relationship with its original quote line items

I'm trying to make a button which clones the quote and keeps the relationship with the original QuoteLineItem. Basically I don't know how to clone related lists. I get the id from the page with ApexPages.currentPage().getParameters().get('id'); Then…
ochiatt
  • 11
  • 1
0
votes
1 answer

APEX - Why aren't my input validations working?

I'm working on a contact search page and I have a problem. My console has no errors but when I run a search, the results don't generate and all of my input validation errors prompt. For Example: Jane Grey The Search for Jane Grey Here is my…
0
votes
2 answers

Calling Apex Class from Lwc only it is getting Saved

I have create one custom object. Using a LWC component, I try to create one record but when try to save it from apex, only ID is getting printed not the Name. I am not getting why only Id is getting printed not the name. Could anybody please help me…
0
votes
1 answer

System.QueryException: List has no rows for assignment to SObject

I want update list of opportunities using visualforce page.In visualforce page I want to update Amount,close date and Stage.The visulaforce page should only show all open opportunities(STAGE NOT EQUALS TO CLOSED WON AND CLOSED LOST). Anyone help me…
Jane
  • 1
  • 1
0
votes
1 answer

Environment variable as custom metadata type in Salesforce

I am trying to represent environment variables in the Salesforce codebase and came across Custom Metadata Types. So based on which Sandbox I am in, I want to vary the baseURL of an external service that I am hitting from my apex class. I want to…
Rishi Katyal
  • 175
  • 5
  • 15
0
votes
1 answer

My Visualforce Custom Search Page is unresponsive?

I'm working on a custom visual force contact search page. Here's what I'm trying to achieve: A user would input either a Name, Phone Number or Email Address into the corresponding fields on the page. After that, they would either click the "Search…
0
votes
1 answer

Why can't I iterate through a list of a Wrapper class in Salesforce Visualforce?

I am trying to iterate through a list of records inside a wrapper class and show them on a Visualforce page. The custom object is called Campaign_Products__c, and the wrapper class is meant to show if the product has been selected by the user to add…
jonsayer
  • 93
  • 1
  • 6
0
votes
2 answers

Salesforce - SharePoint File Upload 400 Bad Request Error

I am trying to upload file from Apex to Sharepoint but getting error as '400 Bad Request'.But work from JS CODE. Following is my code snippet : Apex Code Http http = new Http(); HttpRequest httpRequestToSend = new HttpRequest(); …