We have three losers in the black suits, so we need to ruff diamonds twice in dummy. However, we are short of immediate side-suit entries to hand, so we must combine ruffing with using trumps as entries.
Take the ♦A, ruff a diamond (with the second highest trump – ♦7), cross back to hand with ♥A, ruff our last diamond (as high as possible – ♥9), and return dummy's last heart so that we can draw remaining trumps from hand. Then set up a spade trick.