Apex Questions
Ad
how to add string or an of characters in mysql while using group by function
For example, i have a table named xyz and it has a column country, how can i take out results in the following format using group by function,
Receiving 414 When Hitting Firebase Function
I am receiving an error when posting to my google cloud function - from salesforce execute anonymous - which just takes in the request an saves
SQL Before Delete IF statement
Ok so i'm writing a trigger in sql and what needs to happen is that if t is deleted and f.actdepartdatetime is not null then the table is backed
HTML elements not displaying in the Visualforce Page rendered as PDF in Salesforce
In salesforce: i have printed a barcode using the svg tag in the visualforce page. but, when the visualforce page is rendered as a pdf using the
Combining three chart types Apex charts on Angular
I would like to combine 3 chart types. how to get pulse series to show on chart as scatter? when base chart.type is
Update title dynamically on Apexcharts
I am using updateseries to update x and y axis. how can i update title? $.getjson('chartdata.php', { devicename:
How to change the color of non progreesed bar in Apexcharts RadialBar Charts?
I am working on apexcharts radialbar charts. i am able to implement this chart but i am trying to change the color of non progressed part gray to
how to bind the values from api in apex chart using angular 12
I want to bind the values from api in apexchart area chart app.comp.ts salesforpurchase : result[]
Apex chart (Dynamic loaded) chart implementation
I'am trying to replicate the following graph using react using this amazing library called apex charts
How to make Apexchart (JS library) render at frontend?
I would like to use the apexcharts library for my dashboard. now i am already stuck with a very simple example from their documentation
Ad
How to create Dynamic Action so that according to user's choice page will or will not redirect
i have a link which redirect user to another page in apex. link attributes: class="new_test_run t-button t-button--simple
ApexCharts Stacked Columns specific color for series
I want to display data in apex charts stacked column , with specific color for each series (change the color to red and green, for product a and
ApexCharts barchart vertical categories logic in ReactJs?
I am having a problem trying to figure out how to display the correct data to the correct category. my data is in this format from a json api:
how to use clause "Where IN" in apex ords (REST api)
I am using apex ords to create my own rest api. what i'm trying to do is to create a query that returns in json format a list of animes
Oracle Apex Interactive Report not refreshing after restoring Scroll Position
I've been trying to add a function to keep the scroll position of an interactive report on oracle apex, and it seems to have worked.
collect data via API from the table "apex_activity_log" in APEX ORACLE
I have one question, i want to have one page view statistics and send them through rest. here is my request:
Case on constraint Oracle
We're learning about databases and for our case the database is oracle, in class we we're asked to create a constraint based on the information of
Interaction between two tables that aren't linked
I have the 3 following tables: create table flight ( id_flight number (10) not null, status varchar (50) not null,
Call lightning Web Component from URL and capture parameter from URL
I want to redirect user from one lwc to another by clicking on url in experience cloud. basically, on my first lwc i am showing the list of
How to create a picklist field value using trigger when new record is added?
Apex code to create a record picklist in an object when a new member is created in another object?
Visualforce nested pageblocksections collapse all space
I am trying nested pageblocksections in visualforce apex page. i want the sections to be collapsed by default. i searched on line and found a
Ad
Salesforce popup on opportunity
For a client requirement in opportunity i have added a button to go to a visual force page. before showing the next page though client wants to
How to use isDisable of SelectOption
I have a selectoption and i'm populating like this: maintnoteslist.add(new selectoption(string.valueof('default'),'select description')); i
Didn't understand relationship 'LinkedEntityId' in field path
So i am generally able to query the relationships but i do not have the access to this object in object manager, so what should be the query to
Populating an Apex Map from a SOQL query
// i have a custom metadata object named boatnames__mdt and i'm using two methods to get a list of picklist values in a
Why does SalesForce on before delete trigger delete record before processing?
I have created a trigger in salesforce : trigger mytestdelete_d on account (before delete) { set<id> ids =
How to pass Salesforce Flow variables into Apex Class with correct scope?
I'm trying to use a use a flow in salesforce to pass variables into an apex class that performs an http post to an external api. the flow grabs
Salesforce Tests for Org
Should every apex class have its own test class? currently dealing with tests in an org where 80% of apex tests are under
Workaround for DML Operation after HTTP Response
I need to make a http request and on a successful response, create and insert a record. here's a snippet of the code public static
Refresh table LWC
I've been trying to rerender a table when i update an account record with a lightning-record-form. i tried looking up a solution to this with
Investigate References of Individual System Admin Users in Code and Config
How can we sweep through all code in our salesforce or and config in order to make inventory of where specific system admin users are being
Is there a way to assign a List to a field?
I know the question seems weird but hear me out... say i have a group of users called managers. list userlist = [manager1,
Ad
Catch exception in LWC thrown from Apex in Salesforce
I have the below code to throw an exception from apex @auraenabled() public static void associateaccount(string userid, string
Update Parent Object Field in Apex Trigger
I have three objects 1)truck__c 2)booking__c 3)payment___c. truck and booking has master detail relationship where truckk is master and booking is
How to filter month by string query
I have a sql like this in my apex code: public static list<fb_employees__c> getrecords() { return [
Batch apex with aggregate query which work perfect but when I'm trying to write the test class for this batch apex test class is failing
**when i run the below test class it return empty list in query method. i there any different way to write test class for aggregate batch apex
Automate user creation and deletion through external API requests
I have 0 experience in coding in apex so i would greatly appreciate your help and support with this question! i would like to figure out a
Get id of parent object for the child object in apex
I have two objects (warships and resource). both are custom objects. now i want to add a new resource through the vf page. the resource__c is
Issue deploying change set in salesforce prod - code coverage issue
Being new to salesforce i'm trying to make a prod deployment but it is failing because of code coverage issue. these are the apex classes that i
There are two date fields on an Object say Date1 & Date2,Now I want to Write a SOQL Query in SOQL Editor to fetch all the Object records
There are two date fields on an object say date1 & date2, now i want to write a soql query in soql editor to fetch all the object records
Is there way to get field lookup Id from Visualforce Page in Apex?
Is there a way to get the label id as shown in the elements box. lookup id is fine, that we can get it but to get the label id of "loan"
Create web hook to connect salesforce to google campaign
I'm trying to create a web-hook listener to create a new lead when a form is filled out through google ads. google has an option to use web-hooks
Apex Specialist Challenge 1
I cannot resolve this error. closing a maintenance request of type 'routine maintenance' or 'repair' did not create of a new
Ad
Aura get boolean from parent to child
I am very new to salesforce. the boolean value in the parent component will be updated by clikcing a button. that is done. now i want to toggle a
Can a CronTrigger Job ID be used to determine if a job had been aborted or is invalid?
I have a function that gets called as part of reschedule logic in an apex class that implements implements system.schedulable.
How to check if no new opportunity has been created in past 1 year for an account in salesforce?
I've to create an automation process to check that no new opportunities has been created for an account in past 12 months and update the account
What happens when you call a test using HttpCalloutMock?
This is not a code/case specific question. i am new to apex, and i'm trying to test methods that do callouts to external apis. i understand
Uploading image using VF page and Apex to S3
I have tried creating visualforce page and apex that sends the image to amazon s3 bucket, though it upload successfully but when i viewed the
How to make a Lightning Web Components?
I need to make a lightning web components with this apex class but i don't know how to pass the data to the js and the html and how to create that
Salesforce Apex class to sort years and year ranges giving incorrect output
Tried writing a sort method where input was given like a string of comma-delimited years and year ranges string input = '2017,
Apex trigger firing on dynamically referenced fields from Custom Metadata
I am running into a skill wall when attempting this current problem. i have a custom object (acq__c) that has a series of lookup fields on it to
Encrypt a password with Salesforce Apex using SHA1
I need to write a salesforce apex code that encrypts a password. this is used to poll an external api for which credentials must follow this
How to retrieve ContentNotes information along with LinkedEntity's information with SOQL?
I would like to implement a service that takes a lastmodifieddate as input and returns all contentnote records which were modified after the given
Trying to add output link on redirect page to newly created Opportunity from another VF page
Sf admin trying to make steps into dev. trying to create some web-to-opportunity functionality using combination of force.com sites, apex &
Ad
How to Show/Hide button based on Profile in Salesforce LWC
I have develop lwc component which is normally used by normal users. in that lightning web component button is there as below.
LWC, set record to database soql from JavaScript with wire and Apex, error
I try to write something to the database soql in js, but it not works. when i click to the button 'add to cart' then is called handleplaceorder().
Salesforce: Is there a way I can query my custom Commission table to return all the commissions under all contacts under a specific Account
i have a custom commission table which has a master detail relationship with contact. i have a list of accountids being passed into
SalesForce query returns results in Query Editor, but returns null from APEX code in Lightning component
I'm completely new to salesforce and have inherited a report that's not working. please excuse any incorrect terminology, since i'm learning
Salesforce How to update a roll-up summary field on parent table from inside method that gets triggered when child is persisted
i created a commission object with field called commission_amount__c, this object has a master detail relationship with contact.
Apex, SOQL, add results from database to the List, error
I would like to add results from database to the list. but there is a bug. string str = '\'aoc\',\'bpd\',\'cre\'';
Salesforce, Apex, SOQL, SELECT with INCLUDES
What is wrong at this code in apex? string states = 'california,new york'; list<account> lstacc = [select id, name,
MetadataAPI: Could not resolve list view column: First_Name FIELD_INTEGRITY_EXCEPTION
I am using salesforce metadata api to create a contacts list view with one filter. the filter should contain first name. metadata =
How to resolve a Salesforce flow error where Flow calls an apex class
I have a flow which calls an apex class and here is execution logs error,how to resolve this error error occurred during flow
Salesforce Apex And Visualforce
I'm working on visualforce and apex and i got a situation where i want to combine 3 different tables in which handyman's name is common. also, the
Ad
Salesforce, select from database and add to the list of Contacts
I would like select query from soql, and add to the list of contacts and return it. public class contactsearch { public static
How to create List collection with different SOQLs in APEX
I have an apex trigger which trigers after insert. it is suppose to select opportunities via soql and assign it to list collection. but list and
Button disable in Visual force page
On standard object (account) i have a button called sad. the button is added over there by visual force page. now my question is on account
How to create a new folder in google drive by using trigger on custom object creation?
Created trigger on custom object. and to create folder will call @future method to support rest api calls. but i am not getting the proper code or
How to get key value value based on deserializeUntyped response
Here is my json body what i need key value for example: if tenantcode = 200 what i need is "2" string str
Saleforce Test Classes for CPQ API Models
I'm a bit new to creating salesforce apex. i'm looking to implement saleforce cpq api. do we need to create test classes for the cpq api models?
Converting the Time format in dateTime from 00:00:00 to 23:59:59
I have converted a date into datetime format, and it is returning me the hour format in 00:00:00 but i want it to be in
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
FLS Create for Saleforce Object
Is there a way to apply fls create check - schema.sobjecttype.account.fields.name.iscreateable() to the following? public static
create a note and attach it to multiple records
I figured out this code where i send id and message via params, but i need one single note related to multiple records, not a note for each
Update related records with an Apex trigger
I have the following use case and have trouble to write a correct trigger for it on object account we save our patients. every patient has
Ad
check if an email contains regex expresions
I have to extract all the matching strings contained in a email. the format is simple, 8 digits but when i test it it used to skip the last
How to create customer card in Square using Apex in salesforce?
We had a requirement to create customers and save their credit card information in square using salesforce and them we had to charge payments of
How to solve "Java 8 or more recent is required to run. Please download and install a recent Java runtime." in VSCode?
I'm always getting this error message in vscode from
String Formatting in Apex
I have to format string day='11/22/1999' into '2020-11-26t00:00:00-05:00' this string format with default time value as 0 in apex. please let me
Get list of parent records from multilevel SOQL query
I'm trying to combine 3 separate soql queries into one, but still end up with 3 separate lists for ease of use and readability later.
Docusign / SFDC Web service callout failed: Unable to parse callout response. Apex type not found for element isTLSv12Required
I runned into an issue when trying to connect docusign to sfdc, here are the steps followed : went on my docusign admin portal in
To Reset Field using Visualforce page and apex
Hi i am new to visual force i wanted to learn how to reset the field in visualforce page
Trigger is firing two times, but first run is empty?
The following trigger is firing twice: trigger accounttrigger on account ( before insert, after insert, before update, after
Is it possible to modify the body of triggers and classes in a Salesforce Production instance?
If i have a number of triggers and classes registered in salesforce production instance from my sandbox. if the registered triggers / classes have
Constructor not defined error after setting date fields as null during object creation
I have created a wrapper class to create an object and send it as a request to a third party system. it was working well. but after i added a two
Make LWC Display Different Body Messages Based on Picklist
I have started the lwc below. i am attempting to clean up our rich text screen components on a lightning page. currently there are over 12
Ad
Setting Dependent Custom Lightning Picklist Level2 and Level3 then resetting the Level2 at Lightning component but Level2 Cached Data is Getting Saved
Step 1 in a salesforce lightning component i have a scenario with three levels of dependent picklists, first i am setting
How can I traverse through multiple related objects based on ID and return some related field?
I'm a little stuck. i am trying to generate a report that determines whether anyone has made a manual change to certain fields within our
How To Amend This SOQL to get All records for today After 6am
Is there a way i can customize this soql query to include all records after 6am from today? select case__c, level_1__c,
Facing error while adding document in an envelope via Docusign rest API
I am trying to send a document by converting it into base64 string. the api requires content-length as a require header input. while trying the
How do I use the REST API to update an Apex Trigger?
Curl --location --request put 'https://ap17.salesforce.com/services/data/v48.0/sobjects/apextrigger/01q2x000000yincaak' \ --header
How to Write SOQL for 2 custom objects which have same fields Level_1__c, Level_2__c,Level_3__c
I have a custom object named case_type_data__c with fields level_1__c, level_2__c,level_3__c and i have another custom object
How To Report Records in Batchable Salesforce apex code such that it should report where the Level2 or Level3 are NULL
Here is my current batchable apex code,currently this batch job copies the data over from the new custom object ert_case_type__c to the old
How to send api request from test class to Main class in salesforce?
Class : @restresource(urlmapping='/api/fetch_status/*') global class restdemo{ @httpget global static
Session expired or invalid on using access token
I have created a connected app in which i have selected the oauth scopes "access and manage your data (api)" and "full access
When to use RestRequest/RestResponse and when to use HttpResuest/HttpResponse?
When to use restrequest/restresponse and when to use httpresuest/httpresponse? i am learning rest in saleforce. i know there are methods
Ad
Does implicit typying exist in Apex?
Many modern statically-typed languages provide the ability to write variables without explicitly providing the type. for example, c# uses
Validate a record before against the records in another Object before saving - Salesforce
I have a requirement where in opportunity record detail page has customer, agency, sales owner, account manager fields and there is another custom
Ad
Blog Categories
Ad