New answers tagged

1 vote
Accepted

How to identify and delete a Contact who has moved from "Account A" To Account "B" & Delete "Account A" from AccountContactRelation object

When you have the "Allow Contacts to be related to multiple Accounts" feature enabled, which is what gives you access to the AccountContactRelation object (ACR for short), every relationship ...
user avatar
  • 48.1k
0 votes

Change the format of all Contacts phone numbers to 1234567891

In case you want to use E164 format - here's a utility method I wrote a while back. Adapt as required. YMMV /** ----------------------------------------------------------------- * toE164 : ...
user avatar
  • 62.2k
1 vote
Accepted

Change the format of all Contacts phone numbers to 1234567891

The Salesforce UI automatically formats numbers this way, so you'll want a trigger: trigger FixNumbers on Contact (before insert, before update) { sObjectField[] phoneFields = new sObjectField[] { ...
user avatar
  • 433k
0 votes

IndividualId as a SubscriberKey in Salesforce Marketing Cloud

While it works to some extent, that idea will cause problems down the road and once you start with it, this will get ugly to revert. So: avoid. While you can of course send to any ID (Individual Id or ...
user avatar
0 votes

IF rule on a checkbox field, but the condition is on the Contact field

You need to write a trigger on OpportunityContactRole object. Try with below code and its working in my demo org. Replace the field API names ( Sales, Tech & Product) as per your org. trigger ...
user avatar
3 votes

Triggers on contact to update decsiption field of its parent account

You have queries and DML operations in a loop, both of which are bad. Also, you're querying the records only in the trigger, which would cause the overwriting you've observed. Instead, you'll want to ...
user avatar
  • 433k

Top 50 recent answers are included