You need to sign in to do that
Don't have an account?

how to assemble a map that has a list inside
I need to use this code:
List<Asset> assets = map.get(accountId);For this, I created this map:
Map<Id, List<Asset>>but I do not know how to assemble this map, I have a list of the Assets, and each Asset has a lookup of the Account
https://trailhead.salesforce.com/pt-BR/trailblazer-community/feed/0D54S00000H2pdCSAR
https://salesforce.stackexchange.com/questions/376261/how-to-assemble-a-map-that-has-a-list-inside/376262#376262