Search Results
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 |
A trigger is a feature of the Salesforce platform consisting of Apex code that executes before or after DML operations.
0
votes
0
answers
58
views
Can anyone confirm if the before delete with trigger.old is not firing/working on attachments
I do have a before trigger which is not firing.
trigger deletionPrevention on Attachment (before delete)
{
for ( Attachment currAtt : trigger.old ) {
if ( ! …
0
votes
1
answer
1k
views
Trigger to prevent deletion of Attachments
How do I write a trigger to prevent deletion of attachment (before delete trigger)?
Please some help im a newbie in this area. …
0
votes
3
answers
39
views
Help writing an Unittest
Can anyone help me to write a unit test for following trigger:
trigger deletionPrevention on Attachment (before delete)
{
private list<Profile> allowedProfiles = [ SELECT Id, Name FROM Profile WHERE Name …
0
votes
1
answer
160
views
insert and updat unittest not covering. adderror why?
Why is my catch not working on the adderror on contentversion see:
trigger NoteOnContentversion on ContentVersion (before insert, before update) {
for (ContentVersion c : Trigger.new) { …
1
vote
1
answer
340
views
List index out of bounds: 1 Trigger.NoteOnContentDocument: line 9, column 1: []
I All i seem to get stuck with my trigger. … Below is my code:
trigger NoteOnContentDocument on ContentDocument (before delete) {
for (ContentDocument c : Trigger.old){
List<ContentDocumentLink> links = [ …
0
votes
2
answers
1k
views
Test Class coverage for trigger
I have the following trigger which gives a red flag in the development console on the addError line, how do i remove this with the unittest? … Trigger
trigger NoteOnContentDocument on ContentDocument (before delete) {
for (ContentDocument c : Trigger.old){
List<ContentDocumentLink> links = [SELECT LinkedEntityId FROM ContentDocumentLink …