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
1
answer
2k
views
Trigger - Update minimum and maximum salary on contacts using Trigger
Requirement: I want to update minimum and maximum salary of Contacts using trigger.
For that, I have created custom fields on Account object named as MaxSalary and MinSalary. … My Trigger:
trigger MaxMinSalaryCal on Contact(after insert,after update,after delete) {
Set<Id> accids= new Set<id>();
List<Account> updateList=new List<Account>();
if(Trigger.isInsert|| Trigger.isUpdate …
0
votes
1
answer
73
views
Trigger is creating two related contacts
I want a Trigger to work as: While Inserting Account only one Contact should be created and after updating Account Name, its related Contact Name also gets updated. … Trigger=>>
trigger AccountUpdate on Account (after insert,after update) {
list <Contact> con= new list <Contact>();
if(trigger.IsAfter){
if(Trigger.IsInsert){
for(Account acc …
0
votes
1
answer
2k
views
Trigger to update Contact's Last Name when Account Name is updated
I have written a Trigger in which whenever I create an Account, new Contacts are created with the Last Name same as the Account Name. … Trigger
trigger Account1 on Account (after insert,after update) {
list <contact> con=new list <contact>();
for(Account acc : trigger.new){
contact c = new contact();
c.LastName …