Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 111169

Questions relating to Apex, the native programming language for the Force.com platform. Use it for general questions on syntax, errors, constructs, and rules of use. Most questions should include a code *excerpt* to help answerers understand specifically what has gone wrong or why you need help.

0 votes
0 answers
255 views

Get the emails from formula field from records and send mails to them

Can Someone guide me on how I use the formula field value which I want to use for sending Emails? Here is the code I've written but that field is returning a null value. Here, Client_Manager_Email_ID …
whoisnilu's user avatar
  • 115
0 votes
1 answer
33 views

Why my Map having same values for different Key?

I'm having Requirement to find out get Unique Domain emails of child Contact and update Parent Account field on Domain_Count__c with their related child contact unique Emails. But while debugging It's …
whoisnilu's user avatar
  • 115
1 vote

Contacts Delete - doesnt work System.DmlException: Delete failed. First exception on row 0 w...

Never add SOQL inside for loop as Salesforce has governor limit of 100 SOQL statements in one transaction. Modified your code as Below: List<Contact> contacts = [ SELECT Id, FirstN …
whoisnilu's user avatar
  • 115
1 vote
Accepted

Get for each parent record all child records of a specific object type in a map<parentid, li...

In Map, Yes you can provide Id as ParentId and in values as List of Child records. Eg. Map<Id,List<Contact>> myMap = new Map<Id,List<Contact>>(); for(Account a:[SELECT id,(SELECT Id FROM Contacts …
whoisnilu's user avatar
  • 115
0 votes
1 answer
418 views

How do I use batch apex if my method is creating over 40000 records

It's just a simple question I'm having(It might sound silly but I've no idea how do I insert 40000 records). I'm first creating 200 Accounts and also creating 200 child Opportunities for each Account. …
whoisnilu's user avatar
  • 115
0 votes
1 answer
1k views

How to make Sum of grand child field and show it on Parent record

my requirement is whenever OpportunityLineItem Created makes the sum of quantity available for Opportunity and also take care of rest of Opportunity for particular Account and update Total Sales Quant …
whoisnilu's user avatar
  • 115
0 votes
1 answer
185 views

How to convert JSON String of RESTRequest to Map

I'm new to Integration in salesforce. I'm using RestRequest and getting requestBody something like below: {"event_source":"","media_source":"restricted"} I wanted this string to Map but when I use be …
whoisnilu's user avatar
  • 115
0 votes
1 answer
411 views

why Created Date fields is also update on merge records?

I'm merging the old existing lead with a new lead. but the problem is in the new lead all Created Date and other information is also getting updated in the new lead. which I don't want can anyone sugg …
whoisnilu's user avatar
  • 115
1 vote
2 answers
2k views

How to get returned sObject values In LWC

this.quotation = result; console.log("Names Field:"+this.quotation.Name); }).catch(error => { console.log("Error:"+error.body.message); }); } Apex
whoisnilu's user avatar
  • 115
0 votes
2 answers
449 views

why my JSON deserializeUntyped giving me Exception

I'm creating a new REST API in salesforce and receiving the below JSON in Restrequest string {"event_source":"","event_time":"2022-05-25 08:12:40.151","event_value":"{\"ad\":\"\",\"media_source\":\"re …
whoisnilu's user avatar
  • 115
0 votes

Trigger on Task Object to Increase the value of a numeric field on Contact

Still if you want to use apex then you can use Aggregate Result to get count of task. And use that method on Insert & on change of whoid of task record. …
whoisnilu's user avatar
  • 115