Questions tagged [after-trigger]

After triggers are used to access field values that are set by the system (such as a record's Id or LastModifiedDate field), and to affect changes in other records.

Filter by
Sorted by
Tagged with
0
votes
2answers
74 views

How to populate owner name instead of id from a child object

Here i am trying to get owner name value from child object incident , OwnerId is populating correctly but when i tried with Owner.Name, value is coming null in debug log. Please find my piece of code ...
0
votes
1answer
511 views

Salesforce trigger Opportunity and Opportunity product

I am working on a requirement to create an opportunity and opportunity products , when there is an update on the asset object. The asset object has a filed called Refresh_Asset_To__c, this is a ...
-1
votes
1answer
71 views

Trigger; Initial expression is of incorrect type, expected: String but was: List<String>

//trigger code trigger mailsentcreateaccusindtri on Account (after insert) { //list<string> mail= new list<string>(); if(trigger.isafter && trigger.isinsert) { ...
6
votes
0answers
3k views

ContentDocumentLink Apex after insert trigger error

Edit: I've built an after insert trigger on ContentDocumentLink. On cropredy's direction, I've bulkified my code and I think improved it generally. It "works" in that it accomplishes my business ...
5
votes
1answer
950 views

Is it possible to write Trigger for Before & After DML?

I'm wondering if I can write the trigger on Case, that works before and after DML in one file? I have two triggers on Case - first with method working on records before insert, and second for records ...
-1
votes
1answer
128 views

Help to Matching the two different Object Records?

Could anyone help me to matching the field with two different objects 1.I Have two objects 1.Case 2.custom object Integration__c.here i'm tring to get the matching the some fields of both objects. ...
0
votes
0answers
288 views

How to use current record Id (In after insert trigger) to save it in some different object?

Please find my scenario below I will talk in generic words so that the objects name should not confuse someone. I have written after insert trigger on an object and obviously, I am getting the Id of ...
-2
votes
2answers
158 views

Contact Score Rollup on Account Object

I have to calculate the sum of related child object(contact) on field (Score1__c and Score2__c) to parent object Account object field(AccountScore1__c and AccountScore2__c) my code is working on ...