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

Store the signed version docusign in salesforce

I have written the code to the send the envelope but i need to store the signed version in salesforce record. public class SendDocusignCondController { @AuraEnabled public static Opportunity getOpportunityDetails(String recordId){ …
0
votes
1 answer

How to get stored data in picklist values by using trigger?

I have picklist field name is Type__c and in that values are Disbursal and payment, where Disbursal=1000 & Payment is =5000. My requirement is when I choose disbursal I need a trigger and show the values of disbursal of 1000 and the same as payment…
0
votes
1 answer

How can I subtract values from two different fields in two different objects and populate a custom field in Apex Trigger?

My plans were to populate a new custom field "Quantity Left" in Invoice__c by subtracting "Quantity_Used__c" in another object "Invoice_Log__c" from the total quantity "Quantity__c". I wanted this to trigger every time another item was used and the…
Richard
  • 3
  • 3
0
votes
1 answer

Salesforce Code Coverage Failure: Cannot deploy Apex Trigger in Production despite 100% code coverage in Sandbox

I have a code coverage of 100% for my trigger in Sandbox but when uploading my packages to production I have an error Code Coverage Failure Your code coverage is 74%. You need at least 75% coverage to complete this deployment. I really don't…
0
votes
0 answers

How to Write SOQL as GET method using Salesforce Tooling API On Postman?

How to fetch SOQL using Salesforce Tooling API using postman? How To Use Salesforce Typing API to make SOQL behave like REST API call using POSTMAN to access Salesforce object? As I understand from the below article, i can use Salesforce Typing API…
Carolyn Cordeiro
  • 1,525
  • 3
  • 11
  • 26
0
votes
1 answer

Salesforce: SOSL with CONTAINS

On salesforce i saw apps which are able to run CONTAINS queries. Even the basic list filter functionality on object list allows the CONTAINS filtering. Using SOSL i tried the following: List> searchList = [FIND '*ben* AND *berlin*' IN…
NovumCoder
  • 4,349
  • 9
  • 43
  • 58
0
votes
0 answers

single if v/s ternary operator - performance

Need some understanding regarding performance when using a single if vs ternary operator. I create a wrapper instance wherein I initialize its variables. Eg below : public class MyWrapperClass{ public string sUserName; public…
Ashutosh Arora
  • 167
  • 1
  • 2
  • 8
0
votes
1 answer

VF: Is it possible to show only specific rows in datatable?

I have a datatable based on the OpportunityLineItems Object that shows every Product in the Opportunity Record. Now I want only the products to be shown that are selected by a checkbox. Is there a possibility to render only specific rows in pure…
Dennis1995
  • 55
  • 2
  • 8
0
votes
1 answer

Get Order Products based Order ID

I have added a standardcontroller ("OrderItem) to my visualforce page and also an extension. I am trying to view the OrderItem details based on the Order record ID of the page. But I keep getting the error "Id value is not valid for the OrderItem…
OPM_OK
  • 190
  • 1
  • 1
  • 11
0
votes
1 answer

Create Mock Custom Metadata with Child Relationship Query

I have a Controller class on which I execute a SOQL query to Custom Metadata Type records. The SOQL query also contains a child relationship query (Master-Detail relationship). I need to write a test with mock custom metadata…
Guy BD
  • 69
  • 1
  • 3
  • 10
0
votes
1 answer

Export to excel multiple sheet/tab in salesforce apex

I want to Implement export to excel functionality in salesforce apex with Visual force page. I want to export to excel with multiple sheet/tabs. Sheet/tab would be dynamic. There are multiple datatable/grid is available I have to export each data…
Ravi Shah
  • 843
  • 12
  • 29
0
votes
1 answer

Account Should not have a duplicate contact

Hope you are doing great!!! Can someone help me to achieve this logic. the Logic is about the account should not have a duplicate contact(I have used lastName of the contact). Below is the code public static void…
Tech Skill
  • 25
  • 1
  • 7
0
votes
1 answer

count records in get method REst Apex Services Json Response

@RestResource(urlMapping='/sg/0.1/subscription/') global with sharing class SubsRecord1 { Public Integer count {get;set;} @HttpGet global static List getSubsById() { RestRequest request =…
Nishant
  • 3
  • 1
0
votes
1 answer

Oracle APEX 20.1: Theme Vita Dark CSS-Error on Textfield with autocomplete

When you apply the Vita Dark-theme to your app and have selection lists, such as in a textfield with autocomplete, the background and the text in the select list are white and thus hard to read. Screenshot to show the wrong colors Is there any…
LBR8
  • 61
  • 4
0
votes
0 answers

Unable to access apex or sql-developer through Oracle Cloud web console 404

I'm having issues with the Oracle Cloud ADW (always free tier). The status of the server is available, but when I navigate to tools and click APEX or sql-developer I am met with the message: 404 Not Found --- The request could not be mapped to any…