Salesforce interview question of the day || salesforce developer interview preparation #salesforce

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Steps:

1) Implement this logic in an after delete trigger, iterating over `trigger.old`.
2) Create a map to store Account IDs and their corresponding Parent Account IDs (`mapOfAccIdVsParentAccId`).
3) Query the Contact records where the Account ID is in the keyset of `mapOfAccIdVsParentAccId`.
4) Loop through the queried Contacts, and for each Contact, check if the Account ID exists in `mapOfAccIdVsParentAccId`. If it does, assign the Parent Account ID to the Contact, add it to a list, and update the records.

pushkardahal