Hey trailblazers! I've run into a bit of a headscratcher: trying to use the lighting "Update Record" action to display a component of some key opportunity fields on a Lightning Task detail page.
The trouble I am running into is, when I drop the "Related Record" component onto the Task Detail Lightning Page, it does not give me any options other than "Use This Task" under lookup field.
I am guessing that's because of the polymorphism of the WhatId. As a hacky workaround, I wrote a quick trigger that populates a helper Opportunity Lookup custom Activity field when the value in the WhatId starts with 006 (got this idea here: https://developer.salesforce.com/forums/?id=906F00000008xp0IAA )
It works, but it's kind of a hack stacked on top of another hack, so I thought I'd do a quick dummy check and ask if there's anything obvious I am missing here, if anyone else has run into this, and if you came up with another way to solve it?
I believe a Related Record component requires an Action on the Task object, but you can't do an action for other objects, such as Opp, from Task