Skip to main content

New answers tagged

-2 votes

Triggers on contact to update decsiption field of its parent account

Trigger Contacttest on contact (After Update) { if(trigger.isafter && trigger.isupdate){ Set<Id> IDS = new set<Id>(); List<Account> ACC = new List<...
Jagadeesh Pachipala's user avatar
0 votes

How to avoid "insufficient access rights on cross-reference id" error when inserting a master detail child of Contact by a Community User?

I faced the same challenge recently. In master detail relationship, if current user is not the owner of the master record and he is trying to create a new child record, and it was giving me error that ...
Abhilav Srivastav's user avatar
2 votes

Trigger to update mailing address of contact record when billing street of account record is updated no compilation error but contact not updating

There are multiple things wrong with your code. NewSet is empty (you initialize it to a new list, which is empty) As a result, your query on Account is going to return no records (and you won't get ...
Derek F's user avatar
  • 62.7k
1 vote

Trigger to update mailing address of contact record when billing street of account record is updated no compilation error but contact not updating

list<account> ListOfNewlyUpdatedAccounts = [SELECT id, BillingStreet FROM account WHERE id IN :NewSet]; NewSet is empty, therefore no records will be queried. The rest of your code has nothing ...
sfdcfox's user avatar
  • 497k
1 vote
Accepted

Best way to limit visibility of contacts

There's a lot of ways to do this. Role-Based Sharing Put HR above the other employees. Set OWD to private, then create two sharing rules. The first shares HR to itself, the second shares employees to ...
sfdcfox's user avatar
  • 497k
0 votes
Accepted

How to enable "IsPriorityRecord" field on contact

The IsPriorityRecord field is associated with the UserPrioritizedRecord object, which represents records that users flag as important for tracking in pipeline and intelligence views and filters. To ...
Tushar Jadav's user avatar
  • 2,203
0 votes
Accepted

Creating a trigger that throws error if any contain email is used in lead record. Getting iisues in code

In an Apex class, the Trigger variables are always a generic sObject, rather than a specific type, because the compiler does not know how you intend to use this code. Instead, you should iterate over ...
sfdcfox's user avatar
  • 497k

Top 50 recent answers are included