Linked Questions

-1 votes
1 answer
426 views

How to bulkify my code in a better way? [duplicate]

I’m learning on how to code in Apex, and I’m trying to figure out how I can bulkify my code in a better way so that I won’t get SOQLExceptions. Scenario: Whenever I upload a lot of records using data ...
Jackson Mathews's user avatar
0 votes
1 answer
302 views

Get a list of Master records from a list of child records [duplicate]

I'm making a trigger that runs when contacts are updated. Part of that trigger is to get a list of accounts (the whole object, not just the ID) associated with the contacts that are being updated. ...
denvergreene's user avatar
  • 1,198
-4 votes
1 answer
226 views

Unable to handle Too many SOQL queries Even after BULKIFY: 101 [duplicate]

I have requirement like to display related records related to leads with sic code starts with.So i filtered with using Like operator but i am getting exception 101 exception.But i am not able to ...
Pavan tej's user avatar
  • 1,460
0 votes
1 answer
164 views

How to BULKIFY my code? [duplicate]

I am having a really hard time bulkifying my code, and need to do so becasue I am reaching the SOQL limit on execution. Here is my code as of now. public class Zenefits_Time_Off implements ...
Kris Webster's user avatar
0 votes
1 answer
73 views

Could someone help me with Bulkification? [duplicate]

I know everyone here is big on bulkification..but I've never done it myself. Could somebody give me some pointers on how to bulkify this Trigger? It is a basic duplicate lead trigger. //Look for ...
Alex Brigham's user avatar
  • 1,139
-3 votes
1 answer
85 views

Bulkify the code [duplicate]

I have below code Please tell me how can i bulkify it:- Its checking for duplicate email and if found then a task is created. But because of this class many test classes are failing with error as too ...
Saachi's user avatar
  • 3
0 votes
0 answers
47 views

How to avoid writing nested for loop [duplicate]

I'm new to Map concept and ending up writing queries in for loop causing APEX violations. I have a list of Ids on which I loop over and call a method. To this method I'm passing the Id and another ...
sfdcTod's user avatar
0 votes
0 answers
35 views

Is there a way to create a Map that contains the parentId and the list of its history records? [duplicate]

I have a custom object and it's history is shown in UI. I am tracking the certain field. However, I have a problem putting the parentId and list of its history records into the map. Custom object : ...
user11880836's user avatar
1 vote
4 answers
2k views

bulkifying trigger

I am trying to bulkify my trigger and looking for help looking for help. It works fine as it is for a single record but need to ensure it works in bulk, so need to bulkify it but not sure how. Also, ...
RPham's user avatar
  • 29
6 votes
4 answers
4k views

Bulkified Contact Trigger That Creates An Account?

I'm trying to create a trigger on Contacts that automatically creates and associates an Account if one has not been previously created. This was functionality that we had in a managed package that we ...
dannymorty's user avatar
4 votes
1 answer
24k views

Update same record in after insert/update in a trigger context

I searched a bit for some informations about the need to make an update on a record in after insert/update trigger context. I found that the common feedback was to move the Business logic in before ...
Klodj_Meta's user avatar
4 votes
3 answers
5k views

Lightning Component Best Practices

Inspired from this question General trigger bulkification - best practices I wanted to ask what are the best practices when it comes to lightning components development?
Hemavantha Rajesh Varma Mudunu's user avatar
0 votes
1 answer
6k views

One object has Two triggers with same Event After insert

I have Account object which have two Trigger, one trigger has events before insert and after insert second trigger has after insert event. So which trigger will fire after the record is saved ?
Vivek P's user avatar
  • 197
1 vote
2 answers
4k views

SOQL Query in Trigger

Im writing a Trigger as follows on the Order object. List<Order> Ords = Trigger.New; for(Order O : Ords) { System.debug(':::::::::::O.TotalAmount '+O.TotalAmount); ...
Priya's user avatar
  • 115
0 votes
2 answers
3k views

Fire Trigger Only When Stages Moves to Closed Won

I have the trigger class below and I would like it to fire only when an Opportunity Stage is changed to Closed Won. Can anyone help me figure out how to do this? I have an if statement, but it fires ...
John N.'s user avatar
  • 185

15 30 50 per page