Tag: salesforce

Trigger Scenario: Prevent Duplicate Records Based on Multiple Fields in Salesforce

Trigger to Prevent Duplicate Contacts Using Email or Phone Number We checked in earlier post how to prevent creating duplicate Records if one field is same. Now in case of… Read more »

Trigger: When the field on Contact updates then update field on Opportunity and Account

I have a custom field on the contact record called connect_america_account__c. When the value of this contact field is true, I would like the field value on the opportunity, also… Read more »

Trigger to copy child object picklist values to parent object separated by comma

I have picklist field “Opp_Location__c” on opportunity object and text field “Location_Type__c” on Account object. I want to copy the picklist values from all opportunities related to the account and… Read more »

Apex Trigger Scenario: Based on Parent Object change field value in Child Object

This is a standard “aggregate-query-update” style trigger. First, we gather all accounts that have changed, Then we query for all contacts for those accounts and see if they matched the… Read more »

Apex Trigger Scenario: Based on Child Object change field value in Parent Object

  I have a custom field on the contact record called connect_america_account__c. When the value of this contact field is true, I would like the CB field value on the… Read more »